owobot/commands/test.js

50 lines
1.5 KiB
JavaScript
Raw Normal View History

2024-08-17 06:41:15 -04:00
const { getMessage } = require('../util/lang.js')
module.exports = {
execute: (c) => {
2024-08-18 03:18:09 -04:00
const reply = function (name, item) {
2024-08-17 06:41:15 -04:00
return {
translate: '%s: %s',
color: c.colors.primary,
with: [
{
text: getMessage(c.lang, `command.test.${name}`),
color: c.colors.secondary
},
{
text: item,
2024-08-23 10:40:43 -04:00
color: c.colors.primary,
clickEvent: {
2024-08-24 10:15:39 -04:00
action: 'copy_to_clipboard',
2024-08-23 10:40:43 -04:00
value: item
},
hoverEvent: {
action: 'show_text',
contents: {
text: getMessage(c.lang, 'copyText'),
color: c.colors.secondary
},
value: { // Added twice for backwards compatibility
text: getMessage(c.lang, 'copyText'),
color: c.colors.secondary
}
}
2024-08-17 06:41:15 -04:00
}
]
}
}
2024-08-18 03:18:09 -04:00
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('msgType', c.msgType))
c.reply(reply('prefix', c.prefix))
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))
2024-08-17 06:41:15 -04:00
}
}