mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +00:00
prettify lol
This commit is contained in:
parent
3e81e076b7
commit
a03e5388bc
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@ export async function addRoleAction(
|
|||
if (event.trigger.type === "command" && !canActOn(pluginData, eventData.msg.member, target)) {
|
||||
throw new ActionError("Missing permissions");
|
||||
}
|
||||
const rolesToAdd = (Array.isArray(action.role) ? action.role : [action.role]).filter(id => !target.roles.cache.has(id));
|
||||
const rolesToAdd = (Array.isArray(action.role) ? action.role : [action.role]).filter(
|
||||
id => !target.roles.cache.has(id),
|
||||
);
|
||||
if (rolesToAdd.length === 0) {
|
||||
throw new ActionError("Target already has the role(s) specified");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue