-
-
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: 🐛 Fix Interaction.channel
incorrectly set
#2658
base: master
Are you sure you want to change the base?
fix: 🐛 Fix Interaction.channel
incorrectly set
#2658
Conversation
d9af48f
to
0fcf795
Compare
8683daa
to
96a3141
Compare
Interaction.channel
incorrectly setInteraction.channel
incorrectly set
Removing |
Ok |
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.
please fix changelog entry
Signed-off-by: Paillat <me@paillat.dev>
@@ -306,12 +318,12 @@ def is_component(self) -> bool: | |||
return self.type == InteractionType.component | |||
|
|||
@utils.cached_slot_property("_cs_channel") | |||
@utils.deprecated("Interaction.channel", "2.7", stacklevel=4) |
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.
Why deprecate
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.
Nelo said I should deprecate instead of remove since I removed it in the beginning.
It makes no sense to have it imo, it provides at best the same as .channel
and at worst just partials that serve no purpose that .channel
would not.
Summary
InteractionPayload["channel"]
is partial, thus, when creating a GuildChannel object from it, some attributes were missing/incorrectly set. With this pr,InteractionPayload["channel"]
is used only in the following cases:In all other cases, it uses the full channel object from the cache.
Information
fixes:
permissions_for
returning wrong permissions #2281examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.