[commands] Add GuildStickerConverter

This commit is contained in:
z03h
2021-08-10 05:31:20 -07:00
committed by GitHub
parent 58ca9e9932
commit c628224403
3 changed files with 65 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ __all__ = (
'RoleNotFound',
'BadInviteArgument',
'EmojiNotFound',
'GuildStickerNotFound',
'PartialEmojiConversionFailure',
'BadBoolArgument',
'MissingRole',
@@ -431,6 +432,22 @@ class PartialEmojiConversionFailure(BadArgument):
self.argument = argument
super().__init__(f'Couldn\'t convert "{argument}" to PartialEmoji.')
class GuildStickerNotFound(BadArgument):
"""Exception raised when the bot can not find the sticker.
This inherits from :exc:`BadArgument`
.. versionadded:: 2.0
Attributes
-----------
argument: :class:`str`
The sticker supplied by the caller that was not found
"""
def __init__(self, argument):
self.argument = argument
super().__init__(f'Sticker "{argument}" not found.')
class BadBoolArgument(BadArgument):
"""Exception raised when a boolean argument was not convertable.