From 45af9fa40bc0083de3a695795029d6f6a85ce0d8 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 3 Mar 2019 06:24:35 -0500 Subject: [PATCH] [commands] Allow passing of typing.Union into Greedy. Fix #1951 --- 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 5b77f2fec..324763808 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -500,7 +500,7 @@ class _Greedy: raise TypeError('Greedy[...] only takes a single argument') converter = params[0] - if not inspect.isclass(converter) and not isinstance(converter, Converter): + if not inspect.isclass(converter) and not isinstance(converter, Converter) and not 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: