[commands] Add custom exception classes for built-in checks
Added: * MissingRole * BotMissingRole * MissingAnyRole * BotMissingAnyRole
This commit is contained in:
@ -255,6 +255,9 @@ Exceptions
|
||||
.. autoexception:: discord.ext.commands.BadUnionArgument
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.PrivateMessageOnly
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.NoPrivateMessage
|
||||
:members:
|
||||
|
||||
@ -288,6 +291,21 @@ Exceptions
|
||||
.. autoexception:: discord.ext.commands.BotMissingPermissions
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.MissingRole
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.BotMissingRole
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.MissingAnyRole
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.BotMissingAnyRole
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.NSFWChannelRequired
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.ExtensionError
|
||||
:members:
|
||||
|
||||
@ -326,10 +344,16 @@ Exception Hierarchy
|
||||
- :exc:`~.commands.ExpectedClosingQuoteError`
|
||||
- :exc:`~.commands.CommandNotFound`
|
||||
- :exc:`~.commands.CheckFailure`
|
||||
- :exc:`~.commands.PrivateMessageOnly`
|
||||
- :exc:`~.commands.NoPrivateMessage`
|
||||
- :exc:`~.commands.NotOwner`
|
||||
- :exc:`~.commands.MissingPermissions`
|
||||
- :exc:`~.commands.BotMissingPermissions`
|
||||
- :exc:`~.commands.MissingRole`
|
||||
- :exc:`~.commands.BotMissingRole`
|
||||
- :exc:`~.commands.MissingAnyRole`
|
||||
- :exc:`~.commands.BotMissingAnyRole`
|
||||
- :exc:`~.commands.NSFWChannelRequired`
|
||||
- :exc:`~.commands.DisabledCommand`
|
||||
- :exc:`~.commands.CommandInvokeError`
|
||||
- :exc:`~.commands.CommandOnCooldown`
|
||||
|
Reference in New Issue
Block a user