mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-04 22:42:21 +00:00
Add guild property to DMChannel, GroupChannel, and PartialMessageable
This improves generic duck typing programming by allowing narrowing the types by just checking for a None guild attribute.
This commit is contained in:
@@ -825,7 +825,8 @@ class Client:
|
||||
The optional guild ID to create a partial messageable for.
|
||||
|
||||
This is not required to actually send messages, but it does allow the
|
||||
:meth:`PartialMessageable.jump_url` property to form a well formed URL.
|
||||
:meth:`PartialMessageable.jump_url` and :attr:`PartialMessageable.guild`
|
||||
properties to function properly.
|
||||
type: Optional[:class:`.ChannelType`]
|
||||
The underlying channel type for the partial messageable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user