From ac1b9f56282695c71e12c0025708f23d238a179e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 13 Apr 2019 07:15:54 -0400 Subject: [PATCH] [commands] Fix lambda converters in non-module contexts. Not sure why anyone would do this but might as well fix it. --- discord/ext/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index c5d4f2918..8475be851 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -325,7 +325,7 @@ class Command(_BaseCommand): except AttributeError: pass 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') try: