mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Aliases passed as a list or as a tuple
Nothing too important, felt like some people would appreciate it;
This commit is contained in:
parent
128c9f4eb8
commit
1e9937a234
@ -147,7 +147,7 @@ class Command(_BaseCommand):
|
||||
then the first line of the long help text is used instead.
|
||||
usage: :class:`str`
|
||||
A replacement for arguments in the default help text.
|
||||
aliases: :class:`list`
|
||||
aliases: Union[:class:`list`, :class:`tuple`]
|
||||
The list of aliases the command can be invoked under.
|
||||
enabled: :class:`bool`
|
||||
A boolean that indicates if the command is currently enabled.
|
||||
@ -234,7 +234,7 @@ class Command(_BaseCommand):
|
||||
self.aliases = kwargs.get('aliases', [])
|
||||
|
||||
if not isinstance(self.aliases, (list, tuple)):
|
||||
raise TypeError("Aliases of a command must be a list of strings.")
|
||||
raise TypeError("Aliases of a command must be a list or a tuple of strings.")
|
||||
|
||||
self.description = inspect.cleandoc(kwargs.get('description', ''))
|
||||
self.hidden = kwargs.get('hidden', False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user