[commands] Add subclasses of BadArgument for converters

This commit is contained in:
Simon Beal
2020-09-04 13:45:29 +01:00
committed by GitHub
parent 33fb13043c
commit 6ebd2e13a1
4 changed files with 281 additions and 17 deletions

View File

@@ -107,7 +107,7 @@ def _convert_to_bool(argument):
elif lowered in ('no', 'n', 'false', 'f', '0', 'disable', 'off'):
return False
else:
raise BadArgument(lowered + ' is not a recognised boolean option')
raise BadBooleanArgument(lowered)
class _CaseInsensitiveDict(dict):
def __contains__(self, k):