update/allow sharding
This commit is contained in:
2 files changed
+12
-4
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
const LinesPoliceCadBot = require('./structures/LinesPoliceCadBot');
|
||||||
|
const { GatewayIntentBits } = require('discord.js');
|
||||||
|
const config = require('./config/config');
|
||||||
|
|
||||||
|
let client = new LinesPoliceCadBot({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] }, config);
|
||||||
|
client.build()
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
const LinesPoliceCadBot = require('./structures/LinesPoliceCadBot');
|
const { ShardingManager } = require('discord.js');
|
||||||
const { GatewayIntentBits } = require('discord.js');
|
|
||||||
const config = require('./config/config');
|
const config = require('./config/config');
|
||||||
|
|
||||||
let client = new LinesPoliceCadBot({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] }, config);
|
const manager = new ShardingManager('./bot.js', { token: config.Token });
|
||||||
client.build()
|
|
||||||
|
manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
|
||||||
|
|
||||||
|
manager.spawn();
|
||||||
Reference in new issue
Block a user