Browse Source
[commands] Added ColorConverter alias
pull/5783/head
parafoxia
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
0 deletions
-
discord/ext/commands/converter.py
|
|
@ -42,6 +42,7 @@ __all__ = ( |
|
|
|
'RoleConverter', |
|
|
|
'GameConverter', |
|
|
|
'ColourConverter', |
|
|
|
'ColorConverter', |
|
|
|
'VoiceChannelConverter', |
|
|
|
'EmojiConverter', |
|
|
|
'PartialEmojiConverter', |
|
|
@ -343,6 +344,8 @@ class CategoryChannelConverter(IDConverter): |
|
|
|
|
|
|
|
class ColourConverter(Converter): |
|
|
|
"""Converts to a :class:`~discord.Colour`. |
|
|
|
.. versionchanged:: 1.5 |
|
|
|
Add an alias named ColorConverter |
|
|
|
|
|
|
|
The following formats are accepted: |
|
|
|
|
|
|
@ -370,6 +373,8 @@ class ColourConverter(Converter): |
|
|
|
raise BadArgument('Colour "{}" is invalid.'.format(arg)) |
|
|
|
return method() |
|
|
|
|
|
|
|
ColorConverter = ColourConverter |
|
|
|
|
|
|
|
class RoleConverter(IDConverter): |
|
|
|
"""Converts to a :class:`~discord.Role`. |
|
|
|
|
|
|
|