Browse Source

[commands] Raise TypeError if the name is not a string.

pull/97/head
Rapptz 9 years ago
parent
commit
0466f5965b
  1. 3
      discord/ext/commands/core.py

3
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')

Loading…
Cancel
Save