mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +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) {
|
||||
throw new ActionError("Target already has the role(s) specified");
|
||||
}
|
||||
await target.edit({
|
||||
roles: Array.from(new Set([...targetRoles, ...rolesToAdd])) as Snowflake[],
|
||||
});
|
||||
await target.roles.add(rolesToAdd);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue