-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.js
More file actions
20 lines (16 loc) · 647 Bytes
/
Copy pathindex.js
File metadata and controls
20 lines (16 loc) · 647 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const { ShardingManager } = require('discord.js');
const Logger = require('./src/utils/logger');
// const PRODUCTION = process.env.NODE_ENV === 'production';
// First, loads the ENV variables (e.g. bot's token).
// if not in production mode.
// if (!PRODUCTION) {
// require('dotenv').config();
// }
const manager = new ShardingManager('./bot.js', {
totalShards: 'auto',
// token: PRODUCTION ? process.env.DISCORD_TOKEN : process.env.BETA_DISCORD_TOKEN,
// execArgv: ['--trace-warnings'],
// shardArgs: ['--ansi', '--color'],
});
manager.on('shardCreate', shard => Logger.client(`🚀 Launched shard ${shard.id}`));
manager.spawn();