aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-03-03 06:24:35 -0500
committerRapptz <[email protected]>2019-03-03 06:24:35 -0500
commit45af9fa40bc0083de3a695795029d6f6a85ce0d8 (patch)
treed5ccf706e70d536168200550a2d1378bd86467dd
parentAdd project URLs to setup.py (diff)
downloaddiscord.py-45af9fa40bc0083de3a695795029d6f6a85ce0d8.tar.xz
discord.py-45af9fa40bc0083de3a695795029d6f6a85ce0d8.zip
[commands] Allow passing of typing.Union into Greedy. Fix #1951
-rw-r--r--discord/ext/commands/converter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py
index 5b77f2fe..32476380 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: