diff options
| author | romangraef <[email protected]> | 2019-10-16 19:58:21 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-10-20 05:19:03 -0400 |
| commit | bc642ded6ed9aba8fda9279de0fd00f2603259ab (patch) | |
| tree | 7ae30f337a897b838c9ae28cfb3da224c0834663 | |
| parent | Refactor `name` kwarg for `Emoji.edit()` (diff) | |
| download | discord.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.py | 2 |
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): |