[commands] Add ThreadConverter
This commit is contained in:
@@ -47,6 +47,7 @@ __all__ = (
|
||||
'GuildNotFound',
|
||||
'UserNotFound',
|
||||
'ChannelNotFound',
|
||||
'ThreadNotFound',
|
||||
'ChannelNotReadable',
|
||||
'BadColourArgument',
|
||||
'BadColorArgument',
|
||||
@@ -336,6 +337,22 @@ class ChannelNotFound(BadArgument):
|
||||
self.argument = argument
|
||||
super().__init__(f'Channel "{argument}" not found.')
|
||||
|
||||
class ThreadNotFound(BadArgument):
|
||||
"""Exception raised when the bot can not find the thread.
|
||||
|
||||
This inherits from :exc:`BadArgument`
|
||||
|
||||
..versionadded:: 2.0
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
argument: :class:`str`
|
||||
The thread supplied by the caller that was not found
|
||||
"""
|
||||
def __init__(self, argument):
|
||||
self.argument = argument
|
||||
super().__init__(f'Thread "{argument}" not found.')
|
||||
|
||||
class BadColourArgument(BadArgument):
|
||||
"""Exception raised when the colour is not valid.
|
||||
|
||||
|
Reference in New Issue
Block a user