mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
cc case insensitive
This commit is contained in:
parent
fc073343e4
commit
07afde2d95
@ -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.prefix + "addcom " + command + " "
|
to_replace = ctx.message.content.find(text[0])
|
||||||
text = ctx.message.content.replace(to_replace, "")
|
text = ctx.message.content[to_replace:]
|
||||||
|
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] = {}
|
||||||
cmdlist = self.c_commands[server.id]
|
cmdlist = self.c_commands[server.id]
|
||||||
@ -49,8 +50,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.prefix + "editcom " + command + " "
|
to_replace = ctx.message.content.find(text[0])
|
||||||
text = ctx.message.content.replace(to_replace, "")
|
text = ctx.message.content[to_replace:]
|
||||||
|
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]
|
||||||
if command in cmdlist:
|
if command in cmdlist:
|
||||||
@ -71,6 +73,7 @@ class CustomCommands:
|
|||||||
Example:
|
Example:
|
||||||
!delcom yourcommand"""
|
!delcom yourcommand"""
|
||||||
server = ctx.message.server
|
server = ctx.message.server
|
||||||
|
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]
|
||||||
if command in cmdlist:
|
if command in cmdlist:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user