-
-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect activities and permissions on Interaction
and Option
objects
#1365
Fix incorrect activities and permissions on Interaction
and Option
objects
#1365
Conversation
Bob didn't do this because the cache could be outdated, and thus return an outdated member object. Perhaps we could consider caching the member when an interaction is received? |
Considering that the data that is received in the interaction from Discord is lacking in information, mainly activities/statues/permissions, how would we go about caching only the fields that are valid? Potentially a new method in member like |
I believe the normal |
Interaction
and Option
objectsInteraction
and Option
objects
Need to make sure that this has been extensively tested. |
I have been testing this code on my personal bot for a while now, and I haven't run into any issues yet. If anyone wants to test their bots on this branch that'd be nice as I don't have a public bot to test on right now. Otherwise, I think this PR is ready to be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than things I commented on, looks good
Co-authored-by: plun1331 <49261529+plun1331@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
…` objects (#1365) * Update interactions.py * Cache members on interaction/option * Update core.py * Implement channel cache updating in Options * Implement new flags for member caching * Update guild.py Co-authored-by: plun1331 <49261529+plun1331@users.noreply.github.com> * Remove MemberCacheFlags.option Co-authored-by: Lala Sabathil <lala@pycord.dev> Co-authored-by: plun1331 <49261529+plun1331@users.noreply.github.com>
Summary
This PR fixes an issue in the
Interaction
object wherein activities and status were being represented incorrectly. Atop of this,Option
objects also no longer return invalid activities and statuses ondiscord.Member
.Option
objects also now return correct permissions fordiscord.GuildChannel
classes. Also fixes an issue wherein roles updates were not being reflected properly.Current TODO:
Interaction
objects.Option
objects.Option
objects.PR is open for contributions.
Closes #891, closes #1194, closes #1278, closes #1283, closes #1312
Checklist
type: ignore
comments were used, a comment is also left explaining whyNotes
There is a minor fix to the docs of the
InteractionResponse.send_message()
method in this PR. I figured it was likely not worth a separate PR so it was placed here.