GuildMemberRoleManager.remove() removes more than one role

I'm calling GuildMemberRoleManager.remove() in my code, supplying it with an Array containing a single role.
However, this also removes another role I haven't specified.

Things I've already checked:
  1. I started logging the array right before calling the method. Array still only contains the single role.
  2. Logging also showed that I'm not calling the method (or parent function) twice.
  3. The only other method that could remove roles .set() does not get called.
  4. This doesn't seem to be caused by run time conditions stemming from forgotten await statements.
Relevant code:
  // Only remove one set of roles
  console.log(rolesToRemove)
  await member.roles.remove(rolesToRemove)
    .catch(error => {
      console.error(`Error removing roles for member ${member.displayName}. Is the bot maybe missing the "manage roles" permission?`)
      console.error(error)
    })


Repo: https://github.com/NKN1396/Discord-EmojiToRole/blob/f2500c0254841118c628c342d45780b3e42aa15c/src/trackReactions.mjs#L161

Help would be greatly appreciated, as I've been grinding my teeth out for the past 2 hours.
unknown.png
unknown.png
Was this page helpful?