forked from nexaod/solly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
27 lines (22 loc) · 1018 Bytes
/
index.ts
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
import 'dotenv/config';
import { GatewayIntentBits } from 'discord.js';
import { Indomitable, IndomitableOptions } from 'indomitable';
import Bot from './src/Bot';
if (!process.env.TOKEN) throw new Error('Token Missing');
if (!process.env.ENVIRONMENT) throw new Error('Environment Missing');
const { Guilds, GuildMembers, GuildBans, GuildVoiceStates, GuildMessages, GuildMessageReactions, MessageContent } = GatewayIntentBits;
const sharderOptions: IndomitableOptions = {
clientOptions: {
// disableMentions: 'everyone',
// restRequestTimeout: 30000,
intents: [Guilds, GuildMembers, GuildBans, GuildVoiceStates, GuildMessages, GuildMessageReactions, MessageContent, Guilds, GuildVoiceStates],
},
client: Bot as any,
autoRestart: true,
token: process.env.TOKEN ?? '',
clusterCount: 1,
};
const manager = new Indomitable(sharderOptions).on('error', console.error).on('debug', (message) => {
console.log(`[ClusterHandler] [Main] ${message}`);
});
manager.spawn();