aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromangraef <[email protected]>2019-10-16 19:58:21 +0200
committerRapptz <[email protected]>2019-10-20 05:19:03 -0400
commitbc642ded6ed9aba8fda9279de0fd00f2603259ab (patch)
tree7ae30f337a897b838c9ae28cfb3da224c0834663
parentRefactor `name` kwarg for `Emoji.edit()` (diff)
downloaddiscord.py-bc642ded6ed9aba8fda9279de0fd00f2603259ab.tar.xz
discord.py-bc642ded6ed9aba8fda9279de0fd00f2603259ab.zip
[commands] Allow converters from custom discord.ext extensions
Originally the converting of an argument with type in the discord.* package would try to use the predefined converters, even if there were none present. This is fixed by supplying a default argument to getattr Fixes #2369
-rw-r--r--discord/ext/commands/core.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 4e5721a2..38703016 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -347,7 +347,7 @@ class Command(_BaseCommand):
pass
else:
if module is not None and (module.startswith('discord.') and not module.endswith('converter')):
- converter = getattr(converters, converter.__name__ + 'Converter')
+ converter = getattr(converters, converter.__name__ + 'Converter', converter)
try:
if inspect.isclass(converter):