Skip to content

Commit 48fb083

Browse files
authored
🐛 fix: client error
1 parent f9da957 commit 48fb083

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/bot.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,3 @@ redis.on("ready", () => {
214214
// log in to Discord with your client's token
215215
client.login(token);
216216
});
217-
218-
// export client
219-
module.exports = client;

src/events/message.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
const { Events } = require("discord.js");
2-
const { client } = require("../bot");
1+
const { Client, Events } = require("discord.js");
32
const { sendEmbedMessage, serverTime } = require("../utils/core");
43
const { version } = require("../../package.json");
54

5+
// discord bot instents and partials
6+
const client = new Client({
7+
intents: [
8+
GatewayIntentBits.Guilds,
9+
GatewayIntentBits.MessageContent,
10+
GatewayIntentBits.GuildMessages,
11+
],
12+
partials: [Partials.Channel, Partials.Message],
13+
});
14+
615
module.exports = {
716
name: Events.MessageCreate,
817
once: false,

0 commit comments

Comments
 (0)