aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/ext/commands/converter.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py
index 600f4be9..8676329c 100644
--- a/discord/ext/commands/converter.py
+++ b/discord/ext/commands/converter.py
@@ -298,8 +298,9 @@ class ColourConverter(Converter):
raise BadArgument('Colour "{}" is invalid.'.format(arg))
return discord.Colour(value=value)
except ValueError:
- method = getattr(discord.Colour, arg.replace(' ', '_'), None)
- if method is None or not inspect.ismethod(method):
+ arg = arg.replace(' ', '_')
+ method = getattr(discord.Colour, arg, None)
+ if arg.startswith('from_') or method is None or not inspect.ismethod(method):
raise BadArgument('Colour "{}" is invalid.'.format(arg))
return method()