Fix bug in PartialMessageable.trigger_typing

This commit is contained in:
Haruka 2022-03-07 07:35:20 +07:00 committed by GitHub
parent 87415ab5a7
commit 1bfe3bdff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2142,12 +2142,11 @@ class PartialMessageable(discord.abc.Messageable, Hashable):
def __init__(self, state: ConnectionState, id: int, type: Optional[ChannelType] = None):
self._state: ConnectionState = state
self._channel: Object = Object(id=id)
self.id: int = id
self.type: Optional[ChannelType] = type
async def _get_channel(self) -> Object:
return self._channel
async def _get_channel(self) -> PartialMessageable:
return self
def get_partial_message(self, message_id: int, /) -> PartialMessage:
"""Creates a :class:`PartialMessage` from the message ID.