mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +00:00
Fix Message.channel rebinding sometimes being Object
This commit is contained in:
@ -1763,9 +1763,13 @@ class Message(PartialMessage, Hashable):
|
||||
def _handle_interaction(self, data: MessageInteractionPayload):
|
||||
self.interaction = MessageInteraction(state=self._state, guild=self.guild, data=data)
|
||||
|
||||
def _rebind_cached_references(self, new_guild: Guild, new_channel: Union[TextChannel, Thread]) -> None:
|
||||
def _rebind_cached_references(
|
||||
self,
|
||||
new_guild: Guild,
|
||||
new_channel: Union[GuildChannel, Thread, PartialMessageable],
|
||||
) -> None:
|
||||
self.guild = new_guild
|
||||
self.channel = new_channel
|
||||
self.channel = new_channel # type: ignore # Not all "GuildChannel" are messageable at the moment
|
||||
|
||||
@utils.cached_slot_property('_cs_raw_mentions')
|
||||
def raw_mentions(self) -> List[int]:
|
||||
|
Reference in New Issue
Block a user