mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Fixed custom commands
This commit is contained in:
parent
53df982559
commit
d118fd17f3
@ -24,8 +24,9 @@ class CustomCommands:
|
|||||||
await send_cmd_help(ctx)
|
await send_cmd_help(ctx)
|
||||||
return
|
return
|
||||||
server = ctx.message.server
|
server = ctx.message.server
|
||||||
to_replace = ctx.message.content.find(text[0])
|
content = ctx.message.content
|
||||||
text = ctx.message.content[to_replace:]
|
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] = {}
|
||||||
@ -50,8 +51,9 @@ class CustomCommands:
|
|||||||
await send_cmd_help(ctx)
|
await send_cmd_help(ctx)
|
||||||
return
|
return
|
||||||
server = ctx.message.server
|
server = ctx.message.server
|
||||||
to_replace = ctx.message.content.find(text[0])
|
content = ctx.message.content
|
||||||
text = ctx.message.content[to_replace:]
|
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]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user