shorten in Util

This commit is contained in:
Daniel Odendahl Jr
2017-08-22 21:01:08 +00:00
parent 05e45fbb79
commit 1938b65786
14 changed files with 31 additions and 22 deletions
+1 -5
View File
@@ -19,13 +19,9 @@ module.exports = class UpvoteCommand extends Command {
const { body } = await snekfetch
.get(`https://discordbots.org/api/bots/${this.client.user.id}/votes`)
.set({ Authorization: DBOTSORG_KEY });
const haste = await snekfetch
.post('https://hastebin.com/documents')
.send(body.map(user => `${user.username}#${user.discriminator}`).join('\n'));
return msg.say(stripIndents`
Upvote Xiao and get rewards while joining ${body.length} others!
<https://discordbots.org/bot/${this.client.user.id}>
List of Upvoters: <https://hastebin.com/${haste.body.key}>
<https://discordbots.org/bot/xiaobot>
`);
}
};