forked from Deivu/Kongou
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (27 loc) · 1.02 KB
/
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
const { Constants, Intents, Util } = require('discord.js');
const { Azuma } = require('../Azuma');
const { join } = require('path');
const { token } = require('./config.json');
const { GUILDS, GUILD_MEMBERS, GUILD_BANS, GUILD_VOICE_STATES, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS } = Intents.FLAGS;
const KongouClient = require('./src/Kongou.js');
// cache settings on client file
const customClientOptions = {
disableMentions: 'everyone',
restRequestTimeout: 30000,
intents: [ GUILDS, GUILD_MEMBERS, GUILD_BANS, GUILD_VOICE_STATES, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS ]
};
const sharderOptions = {
clientOptions: Util.mergeDefault(Constants.DefaultOptions, customClientOptions),
client: KongouClient,
timeout: 90000,
token
};
const ratelimitOptions = {
handlerSweepInterval: 2 * 6000,
hashInactiveTimeout: 4 * 6000,
requestOffset: 500
};
const azuma = new Azuma(join(__dirname, '/src/KongouBaseCluster.js'), sharderOptions, ratelimitOptions);
azuma
.spawn()
.catch(console.error);