mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-01 00:20:07 +00:00
* Fix for incorrect oldMember in guildMemberUpdate event after addRole `addRole` would modify the cached GuildMember rather than letting it be handled internally when a guild member update packet is received from Discord, leading to the `oldMember` and `newMember` being identical following a call to `addRole` This is currently how `addRoles` does it, and a correct oldMember is passed to the `guildMemberUpdate` event following a call to `addRoles` * Return cloned member with added/removed role So we can return a member object with the added/removed role without affecting the member object sent to `guildMemberUpdate` * Wait for guildMemberUpdate and return updated GuildMember * Fix linter errors * Remove listeners after 10 seconds