2022-11-14 07:53:44 -05:00
|
|
|
module.exports = {
|
|
|
|
name: 'netmsg',
|
|
|
|
alias: ['networkmessage', 'irc'],
|
|
|
|
description: 'Broadcasts a message to all of the servers that the bot is connected',
|
|
|
|
usage: '<message>',
|
|
|
|
trusted: 0,
|
2022-12-14 08:51:30 -05:00
|
|
|
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
2023-03-25 02:33:38 -04:00
|
|
|
const message = args.join(' ')
|
|
|
|
|
|
|
|
if (message.toLowerCase().includes('netmsg')) return // lazy fix
|
|
|
|
|
2022-11-14 07:53:44 -05:00
|
|
|
const component = [
|
|
|
|
{
|
|
|
|
text: '[',
|
2022-11-27 02:35:28 -05:00
|
|
|
color: 'dark_gray'
|
2022-11-14 07:53:44 -05:00
|
|
|
},
|
|
|
|
{
|
2023-01-19 05:13:25 -05:00
|
|
|
text: bot.server.host === 'kitsune.icu' ? 'kit' : bot.server.host,
|
2022-11-27 02:35:28 -05:00
|
|
|
color: 'gray'
|
2022-11-14 07:53:44 -05:00
|
|
|
},
|
2023-01-19 05:13:25 -05:00
|
|
|
bot.server.host === 'kitsune.icu'
|
2022-11-27 02:35:28 -05:00
|
|
|
? {
|
|
|
|
text: 'sune.icu',
|
|
|
|
color: 'gray'
|
|
|
|
}
|
|
|
|
: '',
|
2022-11-14 07:53:44 -05:00
|
|
|
{
|
|
|
|
text: '] ',
|
2022-11-27 02:35:28 -05:00
|
|
|
color: 'dark_gray'
|
2022-11-14 07:53:44 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
text: username,
|
2022-11-27 02:35:28 -05:00
|
|
|
color: 'gray'
|
2022-11-14 07:53:44 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
text: ' \u203a ',
|
2022-11-27 02:35:28 -05:00
|
|
|
color: 'dark_gray'
|
2022-11-14 07:53:44 -05:00
|
|
|
},
|
|
|
|
{
|
2023-03-25 02:33:38 -04:00
|
|
|
text: message,
|
2022-11-27 02:35:28 -05:00
|
|
|
color: 'gray'
|
|
|
|
}
|
|
|
|
]
|
2022-11-14 07:53:44 -05:00
|
|
|
|
2022-11-27 02:35:28 -05:00
|
|
|
const bots = bot.getBots()
|
2023-01-23 07:19:49 -05:00
|
|
|
for (const bot of bots) {
|
2022-11-27 02:35:28 -05:00
|
|
|
bot.tellraw(selector, component)
|
2023-01-23 07:19:49 -05:00
|
|
|
}
|
2022-11-27 02:35:28 -05:00
|
|
|
}
|
|
|
|
}
|