From 2b707aca1af4a6900b27c9556748c0e232c755da Mon Sep 17 00:00:00 2001 From: 7cc5c4f330d47060 Date: Tue, 16 Jul 2024 17:30:37 -0400 Subject: [PATCH] Add netmsg command --- plugins/commands/netmsg.js | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 plugins/commands/netmsg.js diff --git a/plugins/commands/netmsg.js b/plugins/commands/netmsg.js new file mode 100644 index 0000000..6dff7fd --- /dev/null +++ b/plugins/commands/netmsg.js @@ -0,0 +1,39 @@ +const {bot}=require("../../index.js"); +module.exports={ + execute: (c)=>{ + const json={ + translate: "[%s] %s: %s", + with:[ + { + translate: "%s:%s", + with:[ + { + text: c.host, + color: "light_purple" + }, + { + text: c.port+"", + color: "light_purple" + } + ], + color: "gray" + }, + { + text: c.username, + color: "light_purple" + }, + { + text: c.args.join(" ") + }, + ], + color: "white" + } + for(const i in bot){ + bot[i].tellraw("@a",JSON.stringify(json)) + } + }, + desc: "Send a message to all servers the bot is connected to", // Command description + usage: ' ', // Command usage + hidden: true, // To show the command on the help command list, remove this line + consoleIndex: true // When run from console, the second argument will be a bot ID +}