mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-27 21:21:03 +00:00
feat: Allow multiples roles to train the bot (#8)
This commit is contained in:
8
apps/bot-discord/src/utils/checkPerms.js
Normal file
8
apps/bot-discord/src/utils/checkPerms.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export function checkForPerms(config, member) {
|
||||
for (let role in config.discord.trainRoles) {
|
||||
if (member.roles.cache.get(role)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user