diff options
| author | Rapptz <[email protected]> | 2019-03-03 06:24:35 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-03-03 06:24:35 -0500 |
| commit | 45af9fa40bc0083de3a695795029d6f6a85ce0d8 (patch) | |
| tree | d5ccf706e70d536168200550a2d1378bd86467dd | |
| parent | Add project URLs to setup.py (diff) | |
| download | discord.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.py | 2 |
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: |