From 835a8682c987bdcfc10a6895dac1e8f2b73372a1 Mon Sep 17 00:00:00 2001 From: Twentysix Date: Sat, 9 Apr 2016 21:18:24 +0200 Subject: [PATCH] Prevent creation of CC if command with that name exists --- cogs/customcom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogs/customcom.py b/cogs/customcom.py index 0b27ac551..4252474f5 100644 --- a/cogs/customcom.py +++ b/cogs/customcom.py @@ -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]