mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Remove Server Stats
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { DBOTSORG_KEY } = process.env;
|
||||
|
||||
module.exports = class UpvoteCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'upvote',
|
||||
aliases: ['upvoters', 'updoot'],
|
||||
group: 'util',
|
||||
memberName: 'upvote',
|
||||
description: 'Responds with Xiao\'s upvoter link on discordbots.org.',
|
||||
guarded: true
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get(`https://discordbots.org/api/bots/${this.client.user.id}/votes`)
|
||||
.set({ Authorization: DBOTSORG_KEY });
|
||||
return msg.say(stripIndents`
|
||||
Upvote Xiao and get rewards while joining ${body.length} others!
|
||||
<https://discordbots.org/bot/xiaobot>
|
||||
`);
|
||||
} catch (err) {
|
||||
return msg.say(stripIndents`
|
||||
Upvote Xiao and get rewards!
|
||||
<https://discordbots.org/bot/xiaobot>
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user