mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Shard Count Fix
This commit is contained in:
@@ -44,7 +44,7 @@ class InfoCommand extends commando.Command {
|
|||||||
.addField('Commands',
|
.addField('Commands',
|
||||||
"There are a variety of commands XiaoBot can use! Use ';help' to view a list of all commands!")
|
"There are a variety of commands XiaoBot can use! Use ';help' to view a list of all commands!")
|
||||||
.addField('Servers',
|
.addField('Servers',
|
||||||
guilds + "/" + results, true)
|
guilds + "/" + results.reduce((prev, val) => prev + val, 0), true)
|
||||||
.addField('Shards',
|
.addField('Shards',
|
||||||
this.client.options.shardCount + " (This is Shard: " + this.client.shard.id + ")", true)
|
this.client.options.shardCount + " (This is Shard: " + this.client.shard.id + ")", true)
|
||||||
.addField('Commands',
|
.addField('Commands',
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ client.on('guildCreate', guild => {
|
|||||||
console.log("[Guild] I have joined the guild: " + guild.name + " (" + guild.id + ")...");
|
console.log("[Guild] I have joined the guild: " + guild.name + " (" + guild.id + ")...");
|
||||||
if(client.shard.id !== 0) return;
|
if(client.shard.id !== 0) return;
|
||||||
client.shard.fetchClientValues('guilds.size').then(results => {
|
client.shard.fetchClientValues('guilds.size').then(results => {
|
||||||
console.log("[POST] " + results);
|
console.log("[POST] " + results.reduce((prev, val) => prev + val, 0));
|
||||||
const carbonPOST = {
|
const carbonPOST = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
uri: 'https://www.carbonitex.net/discord/data/botdata.php',
|
uri: 'https://www.carbonitex.net/discord/data/botdata.php',
|
||||||
body: {
|
body: {
|
||||||
key: config.carbonkey,
|
key: config.carbonkey,
|
||||||
servercount: results
|
servercount: results.reduce((prev, val) => prev + val, 0)
|
||||||
},
|
},
|
||||||
json: true
|
json: true
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ client.on('guildCreate', guild => {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
uri: 'https://bots.discord.pw/api/bots/278305350804045834/stats',
|
uri: 'https://bots.discord.pw/api/bots/278305350804045834/stats',
|
||||||
body: {
|
body: {
|
||||||
server_count: results
|
server_count: results.reduce((prev, val) => prev + val, 0)
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': config.botskey
|
'Authorization': config.botskey
|
||||||
@@ -135,13 +135,13 @@ client.on('guildDelete', guild => {
|
|||||||
if(client.shard.id !== 0) return;
|
if(client.shard.id !== 0) return;
|
||||||
console.log("[Guild] I have left the guild: " + guild.name + " (" + guild.id + ")...");
|
console.log("[Guild] I have left the guild: " + guild.name + " (" + guild.id + ")...");
|
||||||
client.shard.fetchClientValues('guilds.size').then(results => {
|
client.shard.fetchClientValues('guilds.size').then(results => {
|
||||||
console.log("[POST] " + results);
|
console.log("[POST] " + results.reduce((prev, val) => prev + val, 0));
|
||||||
const carbonPOST = {
|
const carbonPOST = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
uri: 'https://www.carbonitex.net/discord/data/botdata.php',
|
uri: 'https://www.carbonitex.net/discord/data/botdata.php',
|
||||||
body: {
|
body: {
|
||||||
key: config.carbonkey,
|
key: config.carbonkey,
|
||||||
servercount: results
|
servercount: results.reduce((prev, val) => prev + val, 0)
|
||||||
},
|
},
|
||||||
json: true
|
json: true
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ client.on('guildDelete', guild => {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
uri: 'https://bots.discord.pw/api/bots/278305350804045834/stats',
|
uri: 'https://bots.discord.pw/api/bots/278305350804045834/stats',
|
||||||
body: {
|
body: {
|
||||||
server_count: results
|
server_count: results.reduce((prev, val) => prev + val, 0)
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': config.botskey
|
'Authorization': config.botskey
|
||||||
|
|||||||
Reference in New Issue
Block a user