This repository was archived by the owner on Mar 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
48 lines (43 loc) · 1.29 KB
/
Copy pathindex.js
File metadata and controls
48 lines (43 loc) · 1.29 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
const { Client, Collection, GatewayIntentBits, Partials } = require("discord.js");
const client = new Client(
Heart(GatewayIntentBits, Partials)
);
client.SlashCMD = new Collection();
client.config = require("./config.js");
client.rest.on('rateLimited', (info) => {
console.log("[ Rate Limited Log ]" + info);
});
[ "ClientEvents", "SlashCommands", "ConnectMongo", "HandlingError" ].forEach((Handler) => {
try {
require(`./Handler/${Handler}`)(client)
console.log(`[HANDLER] Loaded ${Handler} System`)
} catch (e) {
console.log(`Error Found In Handler Called ${Handler}\n${e}`)
}
})
client.login(client.config.Bot.Token);
function Heart(blood, oxygen) {
return {
shards: "auto",
failIfNotExists: true,
allowedMentions: {
everyone: false,
roles: false,
users: false
},
intents: [
blood.Guilds,
blood.MessageContent,
blood.GuildVoiceStates,
blood.GuildMessages,
blood.DirectMessages,
blood.GuildInvites,
],
partials: [
oxygen.Channel,
oxygen.Message,
oxygen.User,
oxygen.GuildMember
]
}
}