mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 10:46:14 +10:00
case sensitive commands were a thing
This commit is contained in:
2
index.js
2
index.js
@@ -115,7 +115,7 @@ function doCommand(msg, prefix) {
|
|||||||
if (!message.startsWith(prefix)) return
|
if (!message.startsWith(prefix)) return
|
||||||
|
|
||||||
//Split into command + args
|
//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()
|
msg.suffix = message.substring(prefix.length + command.length).trim()
|
||||||
|
|
||||||
var cmds = client.cachedcommands.filter(cmd => cmd.alias == command);
|
var cmds = client.cachedcommands.filter(cmd => cmd.alias == command);
|
||||||
|
|||||||
Reference in New Issue
Block a user