-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
76 lines (75 loc) · 2.86 KB
/
Copy pathindex.js
File metadata and controls
76 lines (75 loc) · 2.86 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const { Client, Collection, GatewayIntentBits, Collector } = require("discord.js");
const settings = require("./settings.json")
const colors = require("colors")
let client;
if(settings.messageContentCommands.status == true) {
client = new Client({
shards: 'auto',
partials: ['MESSAGE', 'CHANNEL', 'REACTION'],
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
//GatewayIntentBits.GuildMembers,
//GatewayIntentBits.GuildBans,
//GatewayIntentBits.DirectMessageReactions,
//GatewayIntentBits.DirectMessageTyping,
//GatewayIntentBits.DirectMessages,
//GatewayIntentBits.GuildEmojisAndStickers,
//GatewayIntentBits.GuildIntegrations,
//GatewayIntentBits.GuildInvites,
//GatewayIntentBits.GuildMembers,
//GatewayIntentBits.GuildMessageReactions,
//GatewayIntentBits.GuildMessageTyping,
//GatewayIntentBits.GuildMessages,
//GatewayIntentBits.GuildPresences,
//GatewayIntentBits.GuildScheduledEvents,
//GatewayIntentBits.GuildVoiceStates,
//GatewayIntentBits.GuildWebhooks,
]
})
} else {
client = new Client({
shards: 'auto',
partials: ['MESSAGE', 'CHANNEL', 'REACTION'],
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
//GatewayIntentBits.GuildMembers,
//GatewayIntentBits.GuildBans,
//GatewayIntentBits.DirectMessageReactions,
//GatewayIntentBits.DirectMessageTyping,
//GatewayIntentBits.DirectMessages,
//GatewayIntentBits.GuildEmojisAndStickers,
//GatewayIntentBits.GuildIntegrations,
//GatewayIntentBits.GuildInvites,
//GatewayIntentBits.GuildMembers,
//GatewayIntentBits.GuildMessageReactions,
//GatewayIntentBits.GuildMessageTyping,
//GatewayIntentBits.GuildMessages,
//GatewayIntentBits.GuildPresences,
//GatewayIntentBits.GuildScheduledEvents,
//GatewayIntentBits.GuildVoiceStates,
//GatewayIntentBits.GuildWebhooks,
]
})
}
client.slashCommands = new Collection();
if(settings.messageContentCommands.status == true) {
client.commands = new Collection();
client.aliases = new Collection();
['antiCrash', 'commands', 'events', 'slashCommands']
.filter(Boolean)
.forEach(item => {
require(`./handlers/${item}`)(client);
})
} else {
['antiCrash', 'events', 'slashCommands']
.filter(Boolean)
.forEach(item => {
require(`./handlers/${item}`)(client);
})
}
client.login(settings.token).catch(e => {
console.log(`[Error]`.red, "Invalid or No Bot Token Provided.".green)
})