mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 01:25:02 +00:00
use djs helper method for adding roles
This commit is contained in:
parent
6f0b3e0568
commit
dabdd4cad4
1 changed files with 1 additions and 3 deletions
|
@ -33,7 +33,5 @@ export async function addRoleAction(
|
||||||
if (rolesToAdd.length === 0) {
|
if (rolesToAdd.length === 0) {
|
||||||
throw new ActionError("Target already has the role(s) specified");
|
throw new ActionError("Target already has the role(s) specified");
|
||||||
}
|
}
|
||||||
await target.edit({
|
await target.roles.add(rolesToAdd);
|
||||||
roles: Array.from(new Set([...targetRoles, ...rolesToAdd])) as Snowflake[],
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue