Case sensitivity fixes

This commit is contained in:
7cc5c4f330d47060 2024-09-08 22:20:14 -04:00
parent 32852ff120
commit bf111d2648
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
3 changed files with 6 additions and 3 deletions

View file

@ -1,7 +1,8 @@
const { getMessage } = require('../util/lang.js')
module.exports = {
execute: (c) => {
const subcmd = c.args.splice(0, 1)[0]
let subcmd;
if(c.args.length>=1) subcmd = c.args.splice(0, 1)[0].toLowerCase();
switch (subcmd) {
case 'add': {
const rate = +(c.args.splice(0, 1)[0])

View file

@ -65,7 +65,8 @@ const printHelp = (c) => {
}
const printCmdHelp = (c) => {
const cmd = c.args[0]
let cmd;
if(c.args.length>=1) cmd = c.args[0].toLowerCase();
if (!cmds[cmd] || (cmds[cmd].hidden && c.type !== 'console')) {
c.reply({ text: getMessage(c.lang, 'command.help.noCommand') })
return

View file

@ -17,7 +17,8 @@ module.exports = {
})
return
}
const subcmd = c.args.splice(0, 1)[0]
let subcmd;
if(c.args.length>=1) subcmd = c.args.splice(0, 1)[0].toLowerCase();
switch (subcmd) {
case 'set':{
const allowedKeys = ['colorPrimary', 'colorSecondary', 'lang']