-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.js
33 lines (28 loc) · 1.07 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
import { IndomitableStrategy } from 'kearsarge';
import { GatewayIntentBits } from 'discord-api-types/v10';
import { Partials, Options } from 'discord.js';
import { Config } from './dist/Utils.js';
import { Kongou } from './dist/Kongou.js';
import { Manager } from './dist/Manager.js';
const { Guilds, GuildMembers, GuildVoiceStates } = GatewayIntentBits;
const options = {
clientOptions: {
allowedMentions: { parse: [ 'users', 'roles' ] },
partials: [ Partials.User, Partials.GuildMember ],
intents: [ Guilds, GuildMembers, GuildVoiceStates ],
makeCache: Options.cacheWithLimits(Options.DefaultMakeCacheSettings),
ws: {
buildStrategy: manager => new IndomitableStrategy(manager)
}
},
shardCount: Config.shards || undefined,
clusterCount: Config.clusters || undefined,
client: Kongou,
clusterSettings: { execArgv: [ '--enable-source-maps' ] },
autoRestart: true,
handleConcurrency: true,
spawnTimeout: 60000,
token: Config.token
};
const manager = new Manager(options);
manager.start();