aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-02-27 21:38:37 -0500
committerRapptz <[email protected]>2019-02-27 21:38:55 -0500
commit69f5a70eeb914c934fb82886738d24db8b95a174 (patch)
tree11cd71b825b0e49408afee1c05fc1eddd5670fc5
parent[commands] Error out when someone passes plain Cog.listener decorator. (diff)
downloaddiscord.py-69f5a70eeb914c934fb82886738d24db8b95a174.tar.xz
discord.py-69f5a70eeb914c934fb82886738d24db8b95a174.zip
[commands] Allow Converter instances in Greedy. Fix #1939.
-rw-r--r--discord/ext/commands/converter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py
index 3006b200..5b77f2fe 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__)