External Post Stats

This commit is contained in:
Daniel Odendahl Jr
2017-04-23 17:58:20 +00:00
parent bc7153ec91
commit b8f2822789
3 changed files with 35 additions and 38 deletions
+23
View File
@@ -0,0 +1,23 @@
const request = require('superagent');
module.exports.discordBots = async(count, userID) => {
const { body } = await request
.post(`https://bots.discord.pw/api/bots/${userID}/stats`)
.set({
'Authorization': process.env.DISCORD_BOTS_KEY
})
.send({
server_count: count
});
return body.stats[0].server_count;
};
module.exports.carbon = (count) => {
const { text } = await request
.post('https://www.carbonitex.net/discord/data/botdata.php')
.send({
key: process.env.CARBON_KEY,
servercount: count
});
return text;
};