1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-16 02:39:01 +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 
This commit is contained in:
romangraef 2019-10-16 19:58:21 +02:00 committed by Rapptz
parent f273199d57
commit bc642ded6e

@ -347,7 +347,7 @@ class Command(_BaseCommand):
pass
else:
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:
if inspect.isclass(converter):