-
Notifications
You must be signed in to change notification settings - Fork 10
/
shard.js
28 lines (25 loc) · 832 Bytes
/
shard.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
const Discord = require('discord.js');
const client = new Discord.Client();
const config = require("./config.js");
const express = require('express');
const router = express();
const LightPartner = new Discord.ShardingManager('./main.js', {
totalShards: 2,
token: config.token
});
LightPartner.on('shardCreate', shard => {
console.log(`(!) Shard başlatıldı: #${shard.id+1}`)
shard.on('ready', () => {
console.log(`(!) Shard hazır: #${shard.id+1}`);
})
shard.on('disconnect', (a, b) => {
console.log(`(!) Shard bağlantısı koptu: #${shard.id+1}`);
})
shard.on('reconnecting', (a, b) => {
console.log(`(!) Shard yeniden bağlanıyor: #${shard.id+1}`);
})
shard.on('death', (a, b) => {
console.log(`(!) Shard çöktü: #${shard.id+1}`);
})
});
LightPartner.spawn();