Add command testing command

This commit is contained in:
7cc5c4f330d47060 2024-08-17 06:41:15 -04:00
parent 1d7321c41c
commit 8a27db4da5
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
2 changed files with 47 additions and 0 deletions

34
commands/test.js Normal file
View file

@ -0,0 +1,34 @@
const { getMessage } = require('../util/lang.js')
module.exports = {
execute: (c) => {
const reply=function(name, item){
return {
translate: '%s: %s',
color: c.colors.primary,
with: [
{
text: getMessage(c.lang, `command.test.${name}`),
color: c.colors.secondary
},
{
text: item,
color: c.colors.primary
}
]
}
}
c.reply(reply("uuid",c.uuid))
c.reply(reply("username",c.username))
c.reply(reply("nickname",c.nickname))
c.reply(reply("command",c.command))
c.reply(reply("prefix",c.prefix))
c.reply(reply("index",c.index.toString()))
c.reply(reply("args",c.args.join(", ")))
c.reply(reply("verify",c.verify.toString()))
c.reply(reply("host",c.host))
c.reply(reply("port",c.port.toString()))
c.reply(reply("lang",c.lang))
c.reply(reply("colorPrimary",c.colors.primary))
c.reply(reply("colorSecondary",c.colors.secondary))
}
}

View file

@ -69,6 +69,19 @@
"command.settings.error.invalidKey": "Invalid key",
"command.settings.error.invalidLanguage": "Invalid language",
"command.settings.error.mustProvideValue": "You must provide a value",
"command.test.uuid": "UUID",
"command.test.username": "Username",
"command.test.nickname": "Nickname",
"command.test.command": "Command",
"command.test.prefix": "Prefix",
"command.test.index": "Bot ID",
"command.test.args": "Arguments",
"command.test.verify": "Permission level",
"command.test.host": "Server host",
"command.test.port": "Server port",
"command.test.lang": "Language",
"command.test.colorPrimary": "Primary color",
"command.test.colorSecondary": "Secondary color",
"command.about.serverInfo.os.android": "Android %s",
"command.about.serverInfo.os.android.noVersion": "Android",
"command.about.serverInfo.os.freebsd": "FreeBSD %s",