Add command testing command
This commit is contained in:
parent
1d7321c41c
commit
8a27db4da5
2 changed files with 47 additions and 0 deletions
34
commands/test.js
Normal file
34
commands/test.js
Normal 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))
|
||||
}
|
||||
}
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue