Update No permession message

This commit is contained in:
7cc5c4f330d47060 2024-09-06 17:35:29 -04:00
parent 21263ca4d2
commit ff722932bc
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA

View file

@ -45,15 +45,18 @@ module.exports = {
b.emit('command', name, uuid, text, prefix)
if (cmds[cmd[0].toLowerCase()]) {
const command = cmds[cmd[0].toLowerCase()]
const permsN = getMessage(lang, 'command.help.permsNormal')
const permsT = getMessage(lang, 'command.help.permsTrusted')
const permsO = getMessage(lang, 'command.help.permsOwner')
if (command.level !== undefined && command.level > verify) {
b.tellraw(uuid, {
text: getMessage(lang, 'command.disallowed.perms')
})
b.tellraw(uuid, {
text: getMessage(lang, 'command.disallowed.perms.yourLevel', [verify + ''])
text: getMessage(lang, 'command.disallowed.perms.yourLevel', [[permsN, permsT, permsO][verify]])
})
b.tellraw(uuid, {
text: getMessage(lang, 'command.disallowed.perms.cmdLevel', [command.level + ''])
text: getMessage(lang, 'command.disallowed.perms.cmdLevel', [[permsN, permsT, permsO][command.level]])
})
return
}