From bc642ded6ed9aba8fda9279de0fd00f2603259ab Mon Sep 17 00:00:00 2001
From: romangraef <romangraef@gmail.com>
Date: Wed, 16 Oct 2019 19:58:21 +0200
Subject: [PATCH] [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
---
 discord/ext/commands/core.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 4e5721a22..387030161 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):