Browse Source

[commands] Forbid passing a string to aliases in Command.

Fixes #974
pull/977/head
Rapptz 7 years ago
parent
commit
e61ac8e60f
  1. 4
      discord/ext/commands/core.py

4
discord/ext/commands/core.py

@ -149,6 +149,10 @@ class Command:
self.usage = kwargs.get('usage')
self.rest_is_raw = kwargs.get('rest_is_raw', False)
self.aliases = kwargs.get('aliases', [])
if not isinstance(self.aliases, (list, tuple)):
raise TypeError("Aliases of a command must be a list of strings.")
self.description = inspect.cleandoc(kwargs.get('description', ''))
self.hidden = kwargs.get('hidden', False)
signature = inspect.signature(callback)

Loading…
Cancel
Save