mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Prettier carbon and dbots
This commit is contained in:
+13
-9
@@ -1,18 +1,22 @@
|
||||
const request = require('superagent');
|
||||
const { CARBON_KEY, DISCORD_BOTS_KEY } = process.env;
|
||||
const { CARBON_KEY, DBOTS_KEY } = process.env;
|
||||
|
||||
class Stats {
|
||||
static discordBots(server_count, userID) {
|
||||
return request
|
||||
.post(`https://bots.discord.pw/api/bots/${userID}/stats`)
|
||||
.set({ 'Authorization': DISCORD_BOTS_KEY })
|
||||
.send({ server_count });
|
||||
static dBots(server_count, id) {
|
||||
request
|
||||
.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) {
|
||||
return request
|
||||
request
|
||||
.post('https://www.carbonitex.net/discord/data/botdata.php')
|
||||
.send({ key: CARBON_KEY, servercount });
|
||||
.send({ key: CARBON_KEY, servercount })
|
||||
.then(() => console.log('[DBots] Successfully posted to DBots.'))
|
||||
.catch(err => console.error(`[DBots] Failed to post to DBots. ${err}`));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user