Move stuff

This commit is contained in:
dragonfire535
2017-10-16 13:24:04 -04:00
parent 3ae764aaf5
commit f3ad3588bc
4 changed files with 64 additions and 37 deletions
-15
View File
@@ -1,21 +1,6 @@
const snekfetch = require('snekfetch');
const { promisify } = require('util');
const { DBOTS_KEY, DBOTSORG_KEY } = process.env;
class Util {
static postStats(count, id) {
snekfetch
.post(`https://bots.discord.pw/api/bots/${id}/stats`)
.set({ Authorization: DBOTS_KEY })
.send({ server_count: count })
.catch(err => console.error(`[DBOTS] Failed to post to Discord Bots. ${err}`));
snekfetch
.post(`https://discordbots.org/api/bots/${id}/stats`)
.set({ Authorization: DBOTSORG_KEY })
.send({ server_count: count })
.catch(err => console.error(`[DBOTSORG] Failed to post to Discord Bots Org. ${err}`));
}
static wait(time) {
return promisify(setTimeout)(time);
}