2024-08-12 05:13:32 -04:00
|
|
|
const { bot } = require('../index.js')
|
|
|
|
const { getMessage } = require('../util/lang.js')
|
2024-07-28 02:37:31 -04:00
|
|
|
module.exports = {
|
|
|
|
execute: (c) => {
|
2024-08-22 07:34:39 -04:00
|
|
|
if (c.bot.host && c.bot.host.options.hidden) {
|
2024-08-12 05:13:32 -04:00
|
|
|
c.reply({
|
2024-08-22 07:34:39 -04:00
|
|
|
text: getMessage(c.lang, 'command.netmsg.disabled'),
|
2024-08-12 05:13:32 -04:00
|
|
|
color: c.colors.secondary
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
2024-07-28 02:37:31 -04:00
|
|
|
const json = {
|
|
|
|
translate: '[%s] %s: %s',
|
|
|
|
with: [
|
|
|
|
{
|
|
|
|
translate: '%s:%s',
|
|
|
|
with: [
|
|
|
|
{
|
|
|
|
text: c.host,
|
|
|
|
color: c.colors.primary
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text: c.port + '',
|
|
|
|
color: c.colors.primary
|
|
|
|
}
|
|
|
|
],
|
|
|
|
color: c.colors.secondary
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text: c.username,
|
|
|
|
color: c.colors.primary
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text: c.args.join(' ')
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|
2024-07-28 02:37:31 -04:00
|
|
|
],
|
|
|
|
color: 'white'
|
|
|
|
}
|
2024-08-22 07:34:39 -04:00
|
|
|
bot.forEach(item => {
|
|
|
|
if (item.host.options.hidden) return
|
|
|
|
item.tellraw('@a', json)
|
|
|
|
})
|
2024-07-28 02:37:31 -04:00
|
|
|
}
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|