more cleanup

This commit is contained in:
Irdumb 2016-04-07 11:47:00 +10:00
parent 1f641f6ebf
commit 57258f2fcc

View File

@ -21,9 +21,6 @@ class CustomCommands:
!addcom yourcommand Text you want !addcom yourcommand Text you want
""" """
server = ctx.message.server server = ctx.message.server
content = ctx.message.content
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() command = command.lower()
if not server.id in self.c_commands: if not server.id in self.c_commands:
self.c_commands[server.id] = {} self.c_commands[server.id] = {}
@ -45,9 +42,6 @@ class CustomCommands:
!editcom yourcommand Text you want !editcom yourcommand Text you want
""" """
server = ctx.message.server server = ctx.message.server
content = ctx.message.content
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() command = command.lower()
if server.id in self.c_commands: if server.id in self.c_commands:
cmdlist = self.c_commands[server.id] cmdlist = self.c_commands[server.id]