Change PartialReactionEmoji to PartialEmoji, add a PartialEmojiConverter

This commit is contained in:
Gorialis
2018-01-02 07:59:51 +09:00
committed by Rapptz
parent 3112e1c17e
commit 04d9dd9c0d
8 changed files with 55 additions and 19 deletions

View File

@ -304,7 +304,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
called regardless of the state of the internal message cache.
:param emoji: The custom or unicode emoji being reacted to.
:type emoji: :class:`PartialReactionEmoji`
:type emoji: :class:`PartialEmoji`
:param int message_id: The message ID of the message being reacted.
:param int channel_id: The channel ID where the message belongs to.
:param int user_id: The user ID of the user who did the reaction.
@ -328,7 +328,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
called regardless of the state of the internal message cache.
:param emoji: The custom or unicode emoji that got un-reacted.
:type emoji: :class:`PartialReactionEmoji`
:type emoji: :class:`PartialEmoji`
:param int message_id: The message ID of the message being un-reacted.
:param int channel_id: The channel ID where the message belongs to.
:param int user_id: The user ID of the user who removed the reaction.
@ -1888,10 +1888,10 @@ Emoji
.. autoclass:: Emoji()
:members:
PartialReactionEmoji
PartialEmoji
~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: PartialReactionEmoji()
.. autoclass:: PartialEmoji()
:members:
Role

View File

@ -173,6 +173,9 @@ Converters
.. autoclass:: discord.ext.commands.EmojiConverter
:members:
.. autoclass:: discord.ext.commands.PartialEmojiConverter
:members:
.. autoclass:: discord.ext.commands.clean_content
:members:

View File

@ -310,6 +310,7 @@ A lot of discord models work out of the gate as a parameter:
- :class:`Invite`
- :class:`Game`
- :class:`Emoji`
- :class:`PartialEmoji`
- :class:`Colour`
Having any of these set as the converter will intelligently convert the argument to the appropriate target type you
@ -339,6 +340,8 @@ converter is given below:
+-----------------------+-------------------------------------------------+
| :class:`Emoji` | :class:`~ext.commands.EmojiConverter` |
+-----------------------+-------------------------------------------------+
| :class:`PartialEmoji` | :class:`~ext.commands.PartialEmojiConverter` |
+-----------------------+-------------------------------------------------+
| :class:`Colour` | :class:`~ext.commands.ColourConverter` |
+-----------------------+-------------------------------------------------+