-
Notifications
You must be signed in to change notification settings - Fork 3
/
shard.js
27 lines (25 loc) · 914 Bytes
/
shard.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
const CognitumClient = require("./lib/classes/CognitumClient");
const { logger } = require("./lib/classes/Utils");
const { GatewayIntentBits } = require("discord.js");
const cognitum = new CognitumClient({
// Explanation for the intents:
intents: [
// Used in remind command for sending notifications after timer ended
GatewayIntentBits.DirectMessages,
// Used for statistics calculation, messages execution, determining who is who for building contexts
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.MessageContent,
// Detecting new ban and unban events
GatewayIntentBits.GuildModeration,
]
});
cognitum.initialize().then(() => {
logger.info("Shard initialization completed!");
}).catch(error => {
logger.error("Shard initialization failed!");
console.error(error);
process.exit();
});