forked from ScamBaiterDev/ScamBaiter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (23 loc) · 715 Bytes
/
index.js
File metadata and controls
26 lines (23 loc) · 715 Bytes
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
const Discord = require('discord.js');
const config = require("./config.json");
const manager = new Discord.ShardingManager('./bot.js', {
token: config.discord.token
});
manager.on('shardCreate', shard => {
console.log(`Launched shard ${shard.id}`)
shard.on("ready", () => {
console.log(`[DEBUG/SHARD] Shard ${shard.id} connected to Discord's Gateway.`)
// Sending the data to the shard.
shard.send({
type: "activity",
data: {
status: config.discord.status.status,
activities: [{
type: config.discord.status.activities[0].type,
name: `${config.discord.status.activities[0].name} | Shard ${shard.id.toString()}`
}]
}
});
})
});
manager.spawn(config.discord.shardConfig);