|
|
@ -2348,6 +2348,16 @@ class DMChannel(discord.abc.Messageable, discord.abc.Connectable, Hashable): |
|
|
|
""":class:`datetime.datetime`: Returns the direct message channel's creation time in UTC.""" |
|
|
|
return utils.snowflake_time(self.id) |
|
|
|
|
|
|
|
@property |
|
|
|
def guild(self) -> Optional[Guild]: |
|
|
|
"""Optional[:class:`Guild`]: The guild this DM channel belongs to. Always ``None``. |
|
|
|
|
|
|
|
This is mainly provided for compatibility purposes in duck typing. |
|
|
|
|
|
|
|
.. versionadded:: 2.0 |
|
|
|
""" |
|
|
|
return None |
|
|
|
|
|
|
|
@property |
|
|
|
def jump_url(self) -> str: |
|
|
|
""":class:`str`: Returns a URL that allows the client to jump to the channel. |
|
|
@ -2705,6 +2715,16 @@ class GroupChannel(discord.abc.Messageable, discord.abc.Connectable, Hashable): |
|
|
|
""":class:`ChannelType`: The channel's Discord type.""" |
|
|
|
return ChannelType.group |
|
|
|
|
|
|
|
@property |
|
|
|
def guild(self) -> Optional[Guild]: |
|
|
|
"""Optional[:class:`Guild`]: The guild this group channel belongs to. Always ``None``. |
|
|
|
|
|
|
|
This is mainly provided for compatibility purposes in duck typing. |
|
|
|
|
|
|
|
.. versionadded:: 2.0 |
|
|
|
""" |
|
|
|
return None |
|
|
|
|
|
|
|
@property |
|
|
|
def icon(self) -> Optional[Asset]: |
|
|
|
"""Optional[:class:`Asset`]: Returns the channel's icon asset if available.""" |
|
|
@ -3050,6 +3070,11 @@ class PartialMessageable(discord.abc.Messageable, Hashable): |
|
|
|
async def _get_channel(self) -> PartialMessageable: |
|
|
|
return self |
|
|
|
|
|
|
|
@property |
|
|
|
def guild(self) -> Optional[Guild]: |
|
|
|
"""Optional[:class:`Guild`]: The guild this partial messageable is in.""" |
|
|
|
return self._state._get_guild(self.guild_id) |
|
|
|
|
|
|
|
@property |
|
|
|
def jump_url(self) -> str: |
|
|
|
""":class:`str`: Returns a URL that allows the client to jump to the channel.""" |
|
|
|