mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-22 18:03:17 +00:00
Update botListApi.js
This commit is contained in:
parent
b33b82936d
commit
83b449e17f
@ -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);
|
||||
};
|
||||
setInterval(() => {
|
||||
/*dbl.postStats(guildCount * 7, client.shard.ids, client.config.shards);
|
||||
bod.postStats(guildCount * 7, client.shard.ids, client.config.shards)*/
|
||||
}, 1800000);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user