-
Notifications
You must be signed in to change notification settings - Fork 0
/
shard.js
29 lines (24 loc) · 850 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
29
const Discord = require('discord.js');
const client = new Discord.Client()
const config = require("./config.json")
const Shard = new Discord.ShardingManager('./index.js', {
totalShards: 2,
token: ("token")
});
Shard.on('shardCreate', shard => {
console.log(`${shard.id+1} ID'li Shard Başlatıldı ve Kullanıma Hazır.`)
const webhook = new Discord.WebhookClient("webhook ID","webhook TOKEN")
let embed = new Discord.MessageEmbed()
.setDescription(`${shard.id+1} ID'li shard bağlanıyor.`)
webhook.send(embed)
setTimeout(() => {
const webhook = new Discord.WebhookClient("Webhook ID","Webhook TOKEN")
let embed = new Discord.MessageEmbed()
.setDescription(`${shard.id+1} idli shard başarıyla bağlandı!`)
webhook.send(embed)
}, 9000)
});
setTimeout(() => {
Shard.broadcastEval("process.exit()");
}, 860000);
Shard.spawn();