aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-04-13 07:28:26 -0400
committerRapptz <[email protected]>2019-04-13 07:28:26 -0400
commit6574c97a8bfbc610fbae390fc8cb0063e9ed8d79 (patch)
tree48282c693bc51a79de345ffd90e37d5b22af425c
parent[commands] Fix lambda converters in non-module contexts. (diff)
downloaddiscord.py-6574c97a8bfbc610fbae390fc8cb0063e9ed8d79.tar.xz
discord.py-6574c97a8bfbc610fbae390fc8cb0063e9ed8d79.zip
[commands] Support callables in Greedy converter
-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 0ca9096b..2d4375a8 100644
--- a/discord/ext/commands/converter.py
+++ b/discord/ext/commands/converter.py
@@ -492,7 +492,7 @@ class _Greedy:
raise TypeError('Greedy[...] only takes a single argument')
converter = params[0]
- if not inspect.isclass(converter) and not isinstance(converter, Converter) and not hasattr(converter, '__origin__'):
+ if not (callable(converter) or isinstance(converter, Converter) or 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: