mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 08:14:47 +02:00
Test for sharding POST fix
This commit is contained in:
@@ -95,6 +95,7 @@ client.on('guildMemberRemove', member => {
|
||||
|
||||
client.on('guildCreate', guild => {
|
||||
console.log("[Guild] I have joined the guild: " + guild.name + " (" + guild.id + ")...");
|
||||
if(client.shard.id !== 0) return;
|
||||
client.shard.fetchClientValues('guilds.size').then(results => {
|
||||
console.log("[POST] " + results);
|
||||
const carbonPOST = {
|
||||
@@ -131,6 +132,7 @@ client.on('guildCreate', guild => {
|
||||
});
|
||||
|
||||
client.on('guildDelete', guild => {
|
||||
if(client.shard.id !== 0) return;
|
||||
console.log("[Guild] I have left the guild: " + guild.name + " (" + guild.id + ")...");
|
||||
client.shard.fetchClientValues('guilds.size').then(results => {
|
||||
console.log("[POST] " + results);
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
const Discord = require('discord.js');
|
||||
const Manager = new Discord.ShardingManager('./index.js');
|
||||
Manager.spawn(1);
|
||||
Manager.spawn(2);
|
||||
Reference in New Issue
Block a user