Skip to content

Commit

Permalink
🐛 fix: client error
Browse files Browse the repository at this point in the history
  • Loading branch information
warengonzaga authored May 8, 2024
1 parent f9da957 commit 48fb083
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,3 @@ redis.on("ready", () => {
// log in to Discord with your client's token
client.login(token);
});

// export client
module.exports = client;
13 changes: 11 additions & 2 deletions src/events/message.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
const { Events } = require("discord.js");
const { client } = require("../bot");
const { Client, Events } = require("discord.js");
const { sendEmbedMessage, serverTime } = require("../utils/core");
const { version } = require("../../package.json");

// discord bot instents and partials
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessages,
],
partials: [Partials.Channel, Partials.Message],
});

module.exports = {
name: Events.MessageCreate,
once: false,
Expand Down

0 comments on commit 48fb083

Please sign in to comment.