-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.js
43 lines (36 loc) · 928 Bytes
/
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
41
42
43
const {
Client,
Collection,
Intents
} = require('discord.js');
const client = new Client({
intents: [
"GUILDS",
"GUILD_MEMBERS",
"GUILD_BANS",
"GUILD_INTEGRATIONS",
"GUILD_WEBHOOKS",
"GUILD_INVITES",
"GUILD_VOICE_STATES",
"GUILD_PRESENCES",
"GUILD_MESSAGES",
"GUILD_MESSAGE_REACTIONS",
"GUILD_MESSAGE_TYPING",
"DIRECT_MESSAGES",
"DIRECT_MESSAGE_REACTIONS",
"DIRECT_MESSAGE_TYPING",
],
});
const Discord = require('discord.js');
// Call .env file to get Token
require('dotenv').config()
module.exports = client;
// Global Variables
client.discord = Discord;
client.commands = new Collection();
client.slashCommands = new Collection();
client.config = require('./config.json')
// Records commands and events
require("./handler")(client);
// Login Discord Bot Token
client.login(process.env.TOKEN);