From bb3ebc0ebc26b1275364388f13b85f204917a55e Mon Sep 17 00:00:00 2001 From: Vexs Date: Wed, 10 Apr 2019 02:31:55 -0500 Subject: [commands] Add custom exception classes for built-in checks Added: * MissingRole * BotMissingRole * MissingAnyRole * BotMissingAnyRole --- docs/ext/commands/api.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs') diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst index 166fdb1d..3400efe0 100644 --- a/docs/ext/commands/api.rst +++ b/docs/ext/commands/api.rst @@ -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` -- cgit v1.2.3