Browse Source

[commands] Fix lambda converters in non-module contexts.

Not sure why anyone would do this but might as well fix it.
pull/2082/head
Rapptz 6 years ago
parent
commit
ac1b9f5628
  1. 2
      discord/ext/commands/core.py

2
discord/ext/commands/core.py

@ -325,7 +325,7 @@ class Command(_BaseCommand):
except AttributeError: except AttributeError:
pass pass
else: else:
if 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')
try: try:

Loading…
Cancel
Save