mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 01:16:21 +00:00
[commands] add ScheduledEvent converter
This commit is contained in:
@ -419,6 +419,9 @@ Converters
|
||||
.. autoclass:: discord.ext.commands.GuildStickerConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.ScheduledEventConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.clean_content
|
||||
:members:
|
||||
|
||||
@ -547,6 +550,9 @@ Exceptions
|
||||
.. autoexception:: discord.ext.commands.GuildStickerNotFound
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.ScheduledEventNotFound
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.BadBoolArgument
|
||||
:members:
|
||||
|
||||
@ -631,6 +637,7 @@ Exception Hierarchy
|
||||
- :exc:`~.commands.BadInviteArgument`
|
||||
- :exc:`~.commands.EmojiNotFound`
|
||||
- :exc:`~.commands.GuildStickerNotFound`
|
||||
- :exc:`~.commands.ScheduledEventNotFound`
|
||||
- :exc:`~.commands.PartialEmojiConversionFailure`
|
||||
- :exc:`~.commands.BadBoolArgument`
|
||||
- :exc:`~.commands.ThreadNotFound`
|
||||
|
@ -393,6 +393,8 @@ A lot of discord models work out of the gate as a parameter:
|
||||
- :class:`Emoji`
|
||||
- :class:`PartialEmoji`
|
||||
- :class:`Thread` (since v2.0)
|
||||
- :class:`GuildSticker` (since v2.0)
|
||||
- :class:`ScheduledEvent` (since v2.0)
|
||||
|
||||
Having any of these set as the converter will intelligently convert the argument to the appropriate target type you
|
||||
specify.
|
||||
@ -441,6 +443,10 @@ converter is given below:
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Thread` | :class:`~ext.commands.ThreadConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`GuildSticker` | :class:`~ext.commands.GuildStickerConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`ScheduledEvent` | :class:`~ext.commands.ScheduledEventConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
|
||||
By providing the converter it allows us to use them as building blocks for another converter:
|
||||
|
||||
|
Reference in New Issue
Block a user