roleUpdate multiple fires

When I change the permissions/name/color of a newly created role in the server the roleUpdate event fires multiple times cycling all the roles present in the server or above it.. how to avoid this and why does it happen?
4 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Octoboomer
Octoboomer2y ago
Position is handled separately from the other properties d.js actually edits the positions of the other roles to ensure the role is positioned as intended
Adren
AdrenOP2y ago
@allt Ok but...The problem is that: on the roleUpdate event I send a log embed in a channel and this embed is sent numerous times In the event I also ban the executor and if I try to send the embed via the .then() function it sends it only once but reporting a different role from the modified one
Octoboomer
Octoboomer2y ago
You can filter out role position updates

Did you find this page helpful?