From 69f5a70eeb914c934fb82886738d24db8b95a174 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 27 Feb 2019 21:38:37 -0500 Subject: [PATCH] [commands] Allow Converter instances in Greedy. Fix #1939. --- discord/ext/commands/converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 3006b2007..5b77f2fec 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -500,8 +500,8 @@ class _Greedy: raise TypeError('Greedy[...] only takes a single argument') converter = params[0] - if not inspect.isclass(converter): - raise TypeError('Greedy[...] expects a type.') + if not inspect.isclass(converter) and not isinstance(converter, Converter): + raise TypeError('Greedy[...] expects a type or a Converter instance.') if converter is str or converter is type(None) or converter is _Greedy: raise TypeError('Greedy[%s] is invalid.' % converter.__name__)