Case sensitivity fixes
This commit is contained in:
parent
32852ff120
commit
bf111d2648
3 changed files with 6 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
||||||
const { getMessage } = require('../util/lang.js')
|
const { getMessage } = require('../util/lang.js')
|
||||||
module.exports = {
|
module.exports = {
|
||||||
execute: (c) => {
|
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) {
|
switch (subcmd) {
|
||||||
case 'add': {
|
case 'add': {
|
||||||
const rate = +(c.args.splice(0, 1)[0])
|
const rate = +(c.args.splice(0, 1)[0])
|
||||||
|
|
|
@ -65,7 +65,8 @@ const printHelp = (c) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const printCmdHelp = (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')) {
|
if (!cmds[cmd] || (cmds[cmd].hidden && c.type !== 'console')) {
|
||||||
c.reply({ text: getMessage(c.lang, 'command.help.noCommand') })
|
c.reply({ text: getMessage(c.lang, 'command.help.noCommand') })
|
||||||
return
|
return
|
||||||
|
|
|
@ -17,7 +17,8 @@ module.exports = {
|
||||||
})
|
})
|
||||||
return
|
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) {
|
switch (subcmd) {
|
||||||
case 'set':{
|
case 'set':{
|
||||||
const allowedKeys = ['colorPrimary', 'colorSecondary', 'lang']
|
const allowedKeys = ['colorPrimary', 'colorSecondary', 'lang']
|
||||||
|
|
Loading…
Reference in a new issue