mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Prevent creation of CC if command with that name exists
This commit is contained in:
parent
1ef2ed4c04
commit
835a8682c9
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user