Skip to content

Commit

Permalink
perf: remove check if member has role when adding role
Browse files Browse the repository at this point in the history
  • Loading branch information
tippfehlr committed Mar 12, 2024
1 parent 280cead commit de67928
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/modules/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ 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 {
Expand Down

0 comments on commit de67928

Please sign in to comment.