[commands] Fix bug that made functions stop working as converters.
This commit is contained in:
parent
6061f83c3f
commit
629c24339b
@ -174,7 +174,7 @@ class Command:
|
|||||||
if converter.__module__.startswith('discord.'):
|
if converter.__module__.startswith('discord.'):
|
||||||
converter = getattr(converters, converter.__name__ + 'Converter')
|
converter = getattr(converters, converter.__name__ + 'Converter')
|
||||||
|
|
||||||
if issubclass(converter, converters.Converter):
|
if inspect.isclass(converter) and issubclass(converter, converters.Converter):
|
||||||
instance = converter(ctx, argument)
|
instance = converter(ctx, argument)
|
||||||
if asyncio.iscoroutinefunction(instance.convert):
|
if asyncio.iscoroutinefunction(instance.convert):
|
||||||
return (yield from instance.convert())
|
return (yield from instance.convert())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user