From 83b449e17fa66b940f0f8107bfd119a758b9e3fc Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Mon, 27 Apr 2020 15:54:37 +0300 Subject: [PATCH] Update botListApi.js --- src/struct/funcs/botListApi.js | 50 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/struct/funcs/botListApi.js b/src/struct/funcs/botListApi.js index 3f11830d..1c3e93ec 100644 --- a/src/struct/funcs/botListApi.js +++ b/src/struct/funcs/botListApi.js @@ -1,26 +1,26 @@ module.exports = function (client) { - const DBL = require("dblapi.js"); - const dbl = new DBL(client.config.dblKey, client); - const bod_api = require("bodapi.js"); - const bod = new bod_api(client.config.bodKey, client); - let guildCount; + const DBL = require("dblapi.js"); + const dbl = new DBL(client.config.dblKey, client); + const bod_api = require("bodapi.js"); + const bod = new bod_api(client.config.bodKey, client); + let guildCount; - client.shard - .broadcastEval("this.guilds.cache.size") - .then((results) => { - guildCount = results.reduce((prev, val) => prev + val, 0); - dbl.postStats(guildCount * 7, client.shard.ids, client.config.shards); - bod.postStats(guildCount * 7, client.shard.ids, client.config.shards); - }) - .catch(console.error); + client.shard + .broadcastEval("this.guilds.cache.size") + .then((results) => { + guildCount = results.reduce((prev, val) => prev + val, 0); + dbl.postStats(0, client.shard.ids, client.config.shards); + bod.postStats(0, client.shard.ids, client.config.shards); + }) + .catch(console.error); - dbl.on("error", (e) => { - console.log(`DBL error: ${e}`); - }); - bod.on("error", (e) => { - console.log(`BOD error ${e}`); - }); - /*const authOptions = { + dbl.on("error", (e) => { + console.log(`DBL error: ${e}`); + }); + bod.on("error", (e) => { + console.log(`BOD error ${e}`); + }); + /*const authOptions = { url: "https://discord.bots.gg/bots/607266889537945605/stats", headers: { Host: "https://discord.bots.gg/api/v1", @@ -31,8 +31,8 @@ module.exports = function (client) { } } }*/ - setInterval(() => { - dbl.postStats(guildCount * 7, client.shard.ids, client.config.shards); - bod.postStats(guildCount * 7, client.shard.ids, client.config.shards) - }, 1800000); -}; \ No newline at end of file + setInterval(() => { + /*dbl.postStats(guildCount * 7, client.shard.ids, client.config.shards); + bod.postStats(guildCount * 7, client.shard.ids, client.config.shards)*/ + }, 1800000); +};