discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

feat(state): clone User on GuildMemberUpdate

Open ryanblenis opened this issue 1 year ago • 0 comments

Properly reference previous user when user data is changed and GuildMemberUpdate is fired with TrackMembers enabled

Minimal implementation for obtaining before/after snapshot of user changes. See additional information and items for consideration in #1318 if a different implementation path is preferred.

Currently the User changed data is lost as the BeforeUpdate Member copies the pointer to the associated user, leaving both the current Member and BeforeUpdate Member to reference the now updated user properties.

Thank you.

ryanblenis avatar Jan 30 '23 03:01 ryanblenis