-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbot.js
36 lines (32 loc) · 934 Bytes
/
bot.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
const { GatewayIntentBits, Partials } = require("discord.js");
const { BotClient } = require("./Structures/Classes/BotClient");
const {
ErrorHandler,
ClientErrorHandler,
} = require("./Structures/Handlers/ErrorHandler");
const { ClusterClient, getInfo } = require("discord-hybrid-sharding");
const clientOptions = {
allowedMentions: {
parse: ["users", "roles", "everyone"],
repliedUser: false,
},
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
],
partials: [
Partials.Channel,
Partials.Message,
Partials.User,
Partials.GuildMember,
],
shards: ClusterClient.getInfo().SHARD_LIST,
shardCount: ClusterClient.getInfo().TOTAL_SHARDS,
};
const client = new BotClient(clientOptions);
client.cluster = new ClusterClient(client);
ErrorHandler();
ClientErrorHandler(client);
client.start();