mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-07-13 19:31:00 +02:00
feat(arabot): add vegan check to plus command
This commit is contained in:
parent
9ff5b78aff
commit
a5758dc6ef
@ -138,6 +138,14 @@ export class PlusCommand extends Command {
|
|||||||
info.success = true;
|
info.success = true;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Checks if the user is vegan before giving the plus role
|
||||||
|
// If not, stop from giving the plus role
|
||||||
|
if (!member.roles.cache.has(IDs.roles.vegan.vegan)) {
|
||||||
|
info.message = `Can't give ${user} the vegan role as they are not vegan!`;
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
// Add Plus role to the user
|
// Add Plus role to the user
|
||||||
await member.roles.add(plus);
|
await member.roles.add(plus);
|
||||||
await roleAddLog(user.id, mod.id, plus);
|
await roleAddLog(user.id, mod.id, plus);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user