aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-09-04 08:47:07 -0400
committerRapptz <[email protected]>2020-09-04 08:47:07 -0400
commit0a7e2f7c2f4c4f308450318117b1e69e3a5bae5e (patch)
tree2eb42ce4e828bb488395bdf35a0e375f80ace5d8
parent[commands] Add subclasses of BadArgument for converters (diff)
downloaddiscord.py-0a7e2f7c2f4c4f308450318117b1e69e3a5bae5e.tar.xz
discord.py-0a7e2f7c2f4c4f308450318117b1e69e3a5bae5e.zip
[commands] BadBooleanArgument -> BadBoolArgument
-rw-r--r--discord/ext/commands/core.py2
-rw-r--r--discord/ext/commands/errors.py4
-rw-r--r--docs/ext/commands/api.rst4
3 files changed, 5 insertions, 5 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index d91a6143..8e3ad3f2 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -107,7 +107,7 @@ def _convert_to_bool(argument):
elif lowered in ('no', 'n', 'false', 'f', '0', 'disable', 'off'):
return False
else:
- raise BadBooleanArgument(lowered)
+ raise BadBoolArgument(lowered)
class _CaseInsensitiveDict(dict):
def __contains__(self, k):
diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py
index 5c9274ce..6a9eb6af 100644
--- a/discord/ext/commands/errors.py
+++ b/discord/ext/commands/errors.py
@@ -53,7 +53,7 @@ __all__ = (
'BadInviteArgument',
'EmojiNotFound',
'PartialEmojiConversionFailure',
- 'BadBooleanArgument',
+ 'BadBoolArgument',
'MissingRole',
'BotMissingRole',
'MissingAnyRole',
@@ -373,7 +373,7 @@ class PartialEmojiConversionFailure(BadArgument):
self.argument = argument
super().__init__('Couldn\'t convert "{}" to PartialEmoji.'.format(argument))
-class BadBooleanArgument(BadArgument):
+class BadBoolArgument(BadArgument):
"""Exception raised when a boolean argument was not convertable.
This inherits from :exc:`BadArgument`
diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst
index 5980d3cb..6f08a5cd 100644
--- a/docs/ext/commands/api.rst
+++ b/docs/ext/commands/api.rst
@@ -368,7 +368,7 @@ Exceptions
.. autoexception:: discord.ext.commands.PartialEmojiConversionFailure
:members:
-.. autoexception:: discord.ext.commands.BadBooleanArgument
+.. autoexception:: discord.ext.commands.BadBoolArgument
:members:
.. autoexception:: discord.ext.commands.MissingPermissions
@@ -436,7 +436,7 @@ Exception Hierarchy
- :exc:`~.commands.BadInviteArgument`
- :exc:`~.commands.EmojiNotFound`
- :exc:`~.commands.PartialEmojiConversionFailure`
- - :exc:`~.commands.BadBooleanArgument`
+ - :exc:`~.commands.BadBoolArgument`
- :exc:`~.commands.BadUnionArgument`
- :exc:`~.commands.ArgumentParsingError`
- :exc:`~.commands.UnexpectedQuoteError`