From 0466f5965b8adb2f6728ee2ca1440fbc45610ded Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 29 Jan 2016 20:11:22 -0500 Subject: [PATCH] [commands] Raise TypeError if the name is not a string. --- discord/ext/commands/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 97aa2b9ca..94f500d5c 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -113,6 +113,9 @@ class Command: """ def __init__(self, name, callback, **kwargs): self.name = name + if not isinstance(name, str): + raise TypeError('Name of a command must be a string.') + self.callback = callback self.enabled = kwargs.get('enabled', True) self.help = kwargs.get('help')