mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 22:44:32 +02:00
Update Deps
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { upvoters } = require('../../structures/Util');
|
||||
const { dbotsOrgKey } = require('../../config');
|
||||
|
||||
module.exports = class UpvotersCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -16,14 +16,16 @@ module.exports = class UpvotersCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
const upvotes = await upvoters(this.client.user.id);
|
||||
const { body } = await snekfetch
|
||||
.get(`https://discordbots.org/api/bots/${this.client.user.id}/votes`)
|
||||
.set({ Authorization: dbotsOrgKey });
|
||||
const haste = await snekfetch
|
||||
.post('https://hastebin.com/documents')
|
||||
.send(upvotes.join('\n'));
|
||||
.send(body.map((user) => `${user.username}#${user.discriminator}`).join('\n'));
|
||||
return msg.say(stripIndents`
|
||||
Upvote Xiao and join ${upvotes.length} others!
|
||||
Upvote Xiao and get rewards while joining ${body.length} others!
|
||||
<https://discordbots.org/bot/${this.client.user.id}>
|
||||
List of Upvoters: <https://hastebin.com/${body.key}>
|
||||
List of Upvoters: <https://hastebin.com/${haste.body.key}>
|
||||
`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user