aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/ext/commands/core.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 4c541f41..c00ed9dc 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -254,7 +254,12 @@ class Command:
except CommandError as e:
raise e
except Exception as e:
- raise BadArgument('Converting to "{0.__name__}" failed.'.format(converter)) from e
+ try:
+ name = converter.__name__
+ except AttributeError:
+ name = converter.__class__.__name__
+
+ raise BadArgument('Converting to "{}" failed.'.format(name)) from e
@property
def clean_params(self):