Prevent creation of CC if command with that name exists

This commit is contained in:
Twentysix 2016-04-09 21:18:24 +02:00
parent 1ef2ed4c04
commit 835a8682c9

View File

@ -28,6 +28,9 @@ class CustomCommands:
chars = (len(ctx.prefix), len(ctx.invoked_with), len(command))
text = content[chars[0] + chars[1] + chars[2] + 2:] # Gets text of the command
command = command.lower()
if command in self.bot.commands.keys():
await self.bot.say("That command is already a standard command.")
return
if not server.id in self.c_commands:
self.c_commands[server.id] = {}
cmdlist = self.c_commands[server.id]