From e61ac8e60fdd4c155d9a3273a8a2fc8a9bb416d6 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 29 Dec 2017 01:42:45 -0500 Subject: [PATCH] [commands] Forbid passing a string to aliases in Command. Fixes #974 --- discord/ext/commands/core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index c594ec975..0463c843b 100644 --- a/discord/ext/commands/core.py +++ b/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)