From dabdd4cad4d76048fa5ce225ec5a49e3600c8b4a Mon Sep 17 00:00:00 2001 From: metal Date: Sat, 21 Aug 2021 17:32:33 +0000 Subject: [PATCH] use djs helper method for adding roles --- backend/src/plugins/CustomEvents/actions/addRoleAction.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/plugins/CustomEvents/actions/addRoleAction.ts b/backend/src/plugins/CustomEvents/actions/addRoleAction.ts index f511398a..87e94519 100644 --- a/backend/src/plugins/CustomEvents/actions/addRoleAction.ts +++ b/backend/src/plugins/CustomEvents/actions/addRoleAction.ts @@ -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); }