3
0
Fork 0
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:
metal 2021-08-21 17:32:33 +00:00 committed by GitHub
parent 6f0b3e0568
commit dabdd4cad4

View file

@ -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);
}