mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
45 lines
1 KiB
JavaScript
45 lines
1 KiB
JavaScript
/* eslint-disable max-len */
|
|
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,
|
|
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash) {
|
|
const component = [
|
|
{
|
|
text: '[',
|
|
color: 'dark_gray',
|
|
},
|
|
{
|
|
text: bot.options.host === 'kitsune.icu' ? 'kit' : bot.options.host,
|
|
color: 'gray',
|
|
},
|
|
bot.options.host === 'kitsune.icu' ? {
|
|
text: 'sune.icu',
|
|
color: 'gray',
|
|
} : '',
|
|
{
|
|
text: '] ',
|
|
color: 'dark_gray',
|
|
},
|
|
{
|
|
text: username,
|
|
color: 'gray',
|
|
},
|
|
{
|
|
text: ' \u203a ',
|
|
color: 'dark_gray',
|
|
},
|
|
{
|
|
text: args.join(' '),
|
|
color: 'gray',
|
|
},
|
|
];
|
|
|
|
const bots = bot.getBots();
|
|
bots.forEach((bot) => {
|
|
bot.tellraw('@a', component);
|
|
});
|
|
},
|
|
};
|