discordgo
discordgo copied to clipboard
feat(state): clone User on GuildMemberUpdate
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.