From 6574c97a8bfbc610fbae390fc8cb0063e9ed8d79 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 13 Apr 2019 07:28:26 -0400 Subject: [PATCH] [commands] Support callables in Greedy converter --- discord/ext/commands/converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 0ca9096ba..2d4375a86 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -492,7 +492,7 @@ class _Greedy: raise TypeError('Greedy[...] only takes a single argument') converter = params[0] - if not inspect.isclass(converter) and not isinstance(converter, Converter) and not hasattr(converter, '__origin__'): + if not (callable(converter) or isinstance(converter, Converter) or hasattr(converter, '__origin__')): raise TypeError('Greedy[...] expects a type or a Converter instance.') if converter is str or converter is type(None) or converter is _Greedy: