From 62efd882639648f0bcdf50ff26912bcca5f875ac Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Thu, 28 Mar 2019 22:06:35 +1100 Subject: [PATCH] case sensitive commands were a thing --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a4c1b0f..41d8306 100644 --- a/index.js +++ b/index.js @@ -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)] } -} \ No newline at end of file +}