mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
[commands] Allow converters from custom discord.ext extensions
Originally the converting of an argument with type in the discord.* package would try to use the predefined converters, even if there were none present. This is fixed by supplying a default argument to getattr Fixes #2369
This commit is contained in:
parent
f273199d57
commit
bc642ded6e
@ -347,7 +347,7 @@ class Command(_BaseCommand):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if module is not None and (module.startswith('discord.') and not module.endswith('converter')):
|
if module is not None and (module.startswith('discord.') and not module.endswith('converter')):
|
||||||
converter = getattr(converters, converter.__name__ + 'Converter')
|
converter = getattr(converters, converter.__name__ + 'Converter', converter)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if inspect.isclass(converter):
|
if inspect.isclass(converter):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user