Files
xiao/structures/Stats.js
T
Daniel Odendahl Jr 87c0646233 snekfetch
2017-05-15 03:31:13 +00:00

24 lines
854 B
JavaScript

const snekfetch = require('snekfetch');
const { CARBON_KEY, DBOTS_KEY } = process.env;
class Stats {
static dBots(server_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}`));
}
static carbon(servercount) {
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}`));
}
}
module.exports = Stats;