From cdda62be0de18a9c34febeb2065c3740be0fd4c1 Mon Sep 17 00:00:00 2001 From: tippfehlr Date: Tue, 12 Mar 2024 23:49:14 +0100 Subject: [PATCH] revert(perf): remove check if member has role when adding role This reverts commit de67928602975599c0a98e103f301dce8a951de4. --- src/modules/bot.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/bot.ts b/src/modules/bot.ts index cc342af..15a3782 100644 --- a/src/modules/bot.ts +++ b/src/modules/bot.ts @@ -260,6 +260,7 @@ client.on(Events.PresenceUpdate, async (oldMember, newMember) => { return; } if (!highestBotRolePosition || highestBotRolePosition <= role.position) return; + if (newMember.member?.roles.cache.has(role.id)) return; if (permanent) { writeIntPoint('roles_added', 'permanent_roles_added', 1); } else {