This commit is contained in:
Daniel Odendahl Jr
2017-06-01 08:44:02 +00:00
parent 7802bb49cb
commit 14f85f94bd
129 changed files with 1915 additions and 1720 deletions
+16 -9
View File
@@ -2,21 +2,28 @@ const snekfetch = require('snekfetch');
const { CARBON_KEY, DBOTS_KEY } = process.env;
class Stats {
static dBots(server_count, id) {
static dBots(count, id) {
snekfetch
.post(`https://bots.discord.pw/api/bots/${id}/stats`)
.set({ Authorization: DBOTS_KEY })
.send({ server_count })
.then(() => console.log('[Carbon] Successfully posted to Carbon.'))
.catch(err => console.error(`[Carbon] Failed to post to Carbon. ${err}`));
.set({
Authorization: DBOTS_KEY
})
.send({
server_count: count
})
.then(() => console.log('[CARBON] Successfully posted to Carbon.'))
.catch(err => console.error(`[CARBON] Failed to post to Carbon. ${err}`));
}
static carbon(servercount) {
static carbon(count) {
snekfetch
.post('https://www.carbonitex.net/discord/data/botdata.php')
.send({ key: CARBON_KEY, servercount })
.then(() => console.log('[DBots] Successfully posted to DBots.'))
.catch(err => console.error(`[DBots] Failed to post to DBots. ${err}`));
.send({
key: CARBON_KEY,
servercount: count
})
.then(() => console.log('[DBOTS] Successfully posted to Discord Bots.'))
.catch(err => console.error(`[DBOTS] Failed to post to Discord Bots. ${err}`));
}
}