mirror of
https://github.com/litruv/DAdmin.git
synced 2026-11-29 09:55:57 +11:00
case sensitive commands were a thing
This commit is contained in:
1 parent
4b0bb1dba3
commit
62efd88263
1 file changed
+2
-2
@@ -115,7 +115,7 @@ function doCommand(msg, prefix) {
|
||||
if (!message.startsWith(prefix)) return
|
||||
|
||||
//Split into command + args
|
||||
const command = message.substring(prefix.length).split(/[ \n]/)[0].trim()
|
||||
const command = message.substring(prefix.length).split(/[ \n]/)[0].trim().toLowerCase()
|
||||
msg.suffix = message.substring(prefix.length + command.length).trim()
|
||||
|
||||
var cmds = client.cachedcommands.filter(cmd => cmd.alias == command);
|
||||
@@ -136,4 +136,4 @@ function doCommand(msg, prefix) {
|
||||
|
||||
delete require.cache[require.resolve('./commands/' + cmds[0].file)]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user