-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (35 loc) · 1.2 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const { Client, GatewayIntentBits, Partials, Collection } = require("discord.js");
const Betterlog = require("betterlogs.js");
require("dotenv").config();
require("colors");
const client = new Client({
intents: [
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildIntegrations,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMessageTyping,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
],
partials: [
Partials.Channel,
Partials.GuildMember,
Partials.Message,
Partials.Reaction,
Partials.ThreadMember,
Partials.User
],
});
client.commands = new Collection();
client.events = new Collection();
client.login(process.env.DISCORD_TOKEN).then(() => {
Betterlog.info("1", "Start logging into Discord application...".yellow);
require("./Handlers/loadEvents")(client);
require("./Handlers/loadCommands")(client);
}).catch((err) => {
Betterlog.error("1", `\n${err}`.bgRed);
});