mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Improve generic duck type programming with PartialMessageable
This adds jump_url, permissions_for, and created_at. Luckily, most cases of this type being constructed already have the guild_id at creation time.
This commit is contained in:
@ -223,7 +223,7 @@ class Interaction:
|
||||
if channel is None:
|
||||
if self.channel_id is not None:
|
||||
type = ChannelType.text if self.guild_id is not None else ChannelType.private
|
||||
return PartialMessageable(state=self._state, id=self.channel_id, type=type)
|
||||
return PartialMessageable(state=self._state, guild_id=self.guild_id, id=self.channel_id, type=type)
|
||||
return None
|
||||
return channel
|
||||
|
||||
|
Reference in New Issue
Block a user