mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Upvoters Command
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user