Title: GuildMemberUpdated event is not working as expected. · Issue #1663 · DSharpPlus/DSharpPlus · GitHub
Open Graph Title: GuildMemberUpdated event is not working as expected. · Issue #1663 · DSharpPlus/DSharpPlus
X Title: GuildMemberUpdated event is not working as expected. · Issue #1663 · DSharpPlus/DSharpPlus
Description: Discussed in #1662 Originally posted by eyagovbusiness October 27, 2023 Hey there! 👋 So, I was diving into the DiscordClient.GuildMemberUpdated AsyncEventHandler just the other day. Decided to test it out by changing my avatar image. Fun...
Open Graph Description: Discussed in #1662 Originally posted by eyagovbusiness October 27, 2023 Hey there! 👋 So, I was diving into the DiscordClient.GuildMemberUpdated AsyncEventHandler just the other day. Decided to test...
X Description: Discussed in #1662 Originally posted by eyagovbusiness October 27, 2023 Hey there! 👋 So, I was diving into the DiscordClient.GuildMemberUpdated AsyncEventHandler just the other day. Decided to test...
Opengraph URL: https://github.com/DSharpPlus/DSharpPlus/issues/1663
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"GuildMemberUpdated event is not working as expected.","articleBody":"### Discussed in https://github.com/DSharpPlus/DSharpPlus/discussions/1662\r\n\r\n\u003cdiv type='discussions-op-text'\u003e\r\n\r\n\u003csup\u003eOriginally posted by **eyagovbusiness** October 27, 2023\u003c/sup\u003e\r\nHey there! 👋\r\n\r\nSo, I was diving into the DiscordClient.GuildMemberUpdated AsyncEventHandler just the other day. Decided to test it out by changing my avatar image. Funny thing, I noticed that GuildMemberUpdateEventArgs.MemberAfter was the same as...well, GuildMemberUpdateEventArgs.MemberAfter itself. 😅 Here's what I was looking at:\r\n\r\nThought I'd pull the repo and snoop around a bit. Found the quirk in the \"internal async Task OnGuildMemberUpdateEventAsync(TransportMember member, DiscordGuild guild)\" inside DiscordClient.Dispatch.cs. Looks like this method is doing double duty - updating the cached member and users. Cool, but it makes MemberBefore and MemberAfter end up being identical after the UserCache and guild.Members update.\r\n\r\nGot some thoughts on how to tweak this, but wanted to touch base with you first. Were you guys aiming to track every change when a member's updated in this handler? Or was it more about just keeping the cached items fresh?\r\n\r\nThank you for your work and your time\u003c/div\u003e\r\n\r\n\u003chr\u003e\r\n\r\nIdeally the GuildMemberUpdate event should work like this: Any `*Before` properties should contain the \"old\" cached information that we received previously. Any `*After` properties should contain the new information copied straight from Discord, with minimal (ideally none!) modification.","author":{"url":"https://github.com/OoLunar","@type":"Person","name":"OoLunar"},"datePublished":"2023-10-27T18:22:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1663/DSharpPlus/issues/1663"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a70e1225-435e-7f29-ee07-22830cda4497 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A62E:2783D0:2677E2:32E482:698D761D |
| html-safe-nonce | 2c2ee3c57fbbafad28a36aa8a370a3fb9a0c7cb9c96038e2d806a074750903dd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjJFOjI3ODNEMDoyNjc3RTI6MzJFNDgyOjY5OEQ3NjFEIiwidmlzaXRvcl9pZCI6IjQ2NzkyNzQ0MzQ0NzY3MzM5ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f5d444a3982499ec4e6b6acd804cbe77d066edab32786493ca131acb7fc757aa |
| hovercard-subject-tag | issue:1965997150 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DSharpPlus/DSharpPlus/1663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8195fbe567ca218be253b246872e7c9b5e4d0b8b2b5175f53fe39e003d53cf89/DSharpPlus/DSharpPlus/issues/1663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8195fbe567ca218be253b246872e7c9b5e4d0b8b2b5175f53fe39e003d53cf89/DSharpPlus/DSharpPlus/issues/1663 |
| og:image:alt | Discussed in #1662 Originally posted by eyagovbusiness October 27, 2023 Hey there! 👋 So, I was diving into the DiscordClient.GuildMemberUpdated AsyncEventHandler just the other day. Decided to test... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | OoLunar |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a |
| turbo-cache-control | no-preview |
| go-import | github.com/DSharpPlus/DSharpPlus git https://github.com/DSharpPlus/DSharpPlus.git |
| octolytics-dimension-user_id | 36208721 |
| octolytics-dimension-user_login | DSharpPlus |
| octolytics-dimension-repository_id | 67243489 |
| octolytics-dimension-repository_nwo | DSharpPlus/DSharpPlus |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 67243489 |
| octolytics-dimension-repository_network_root_nwo | DSharpPlus/DSharpPlus |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 715890fa442134f528fb422ab338c0ad55c7a025 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width