[commands] Allow builtin unbound method converters
This commit is contained in:
parent
d53c3a6c12
commit
ad7506050c
@ -201,7 +201,12 @@ class Command:
|
|||||||
if converter is bool:
|
if converter is bool:
|
||||||
return _convert_to_bool(argument)
|
return _convert_to_bool(argument)
|
||||||
|
|
||||||
if converter.__module__.startswith('discord.') and not converter.__module__.endswith('converter'):
|
try:
|
||||||
|
module = converter.__module__
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
if module.startswith('discord.') and not module.endswith('converter'):
|
||||||
converter = getattr(converters, converter.__name__ + 'Converter')
|
converter = getattr(converters, converter.__name__ + 'Converter')
|
||||||
|
|
||||||
if inspect.isclass(converter):
|
if inspect.isclass(converter):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user