Upvoters Command

This commit is contained in:
Daniel Odendahl Jr
2017-07-12 15:02:51 +00:00
parent 0e71a0963d
commit b1bfeaa959
3 changed files with 37 additions and 1 deletions
+7
View File
@@ -39,6 +39,13 @@ class Util {
.then(() => console.log('[DBOTSORG] Successfully posted to Discord Bots Org.'))
.catch((err) => console.error(`[DBOTSORG] Failed to post to Discord Bots Org. ${err}`));
}
async static upvoters(id) {
const { body } = await snekfetch
.get(`https://discordbots.org/api/bots/${id}/votes`)
.set({ Authorization: dbotsOrgKey });
return body.map((user) => `${user.username}#${user.discriminator}`);
}
}
module.exports = Util;