This commit is contained in:
Dragon Fire
2021-04-16 08:00:11 -04:00
parent 3e34d5419b
commit fa46943e12
2 changed files with 9 additions and 8 deletions
+1
View File
@@ -310,6 +310,7 @@ client.on('voiceStateUpdate', async (oldState, newState) => {
client.dispatchers.delete(oldState.guild.id);
} else {
const channel = await client.channels.fetch(oldState.channelID);
if (!channel) return;
if (channel.members.size === 1 && channel.members.has(client.user.id)) {
const dispatcher = client.dispatchers.get(oldState.guild.id);
if (dispatcher) {
+8 -8
View File
@@ -66,12 +66,8 @@ module.exports = class XiaoClient extends CommandoClient {
try {
const { body } = await request
.post(`https://discordbotlist.com/api/v1/bots/${this.user.id}/stats`)
.set({ Authorization: DISCORDBOTLIST_TOKEN })
.send({
guilds: this.guilds.size,
users: this.users.size,
voice_connections: this.dispatchers.size
});
.set({ Authorization: BOTS_GG_TOKEN })
.send({ guildCount: this.guilds.size });
this.logger.info('[BOTS.GG] Posted stats.');
return body;
} catch (err) {
@@ -84,8 +80,12 @@ module.exports = class XiaoClient extends CommandoClient {
try {
const { body } = await request
.post(`https://discord.bots.gg/api/bots/${this.user.id}/stats`)
.set({ Authorization: BOTS_GG_TOKEN })
.send({ guildCount: this.guilds.size });
.set({ Authorization: DISCORDBOTLIST_TOKEN })
.send({
guilds: this.guilds.size,
users: this.users.size,
voice_connections: this.dispatchers.size
});
this.logger.info('[DISCORDBOTLIST] Posted stats.');
return body;
} catch (err) {