[commands] add ScheduledEvent converter

This commit is contained in:
z03h
2022-03-09 14:56:50 -08:00
committed by GitHub
parent bf3eb0a7fe
commit 93fba264ad
4 changed files with 94 additions and 1 deletions

View File

@ -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: