Add netmsg command
This commit is contained in:
parent
5a58c878d6
commit
2b707aca1a
1 changed files with 39 additions and 0 deletions
39
plugins/commands/netmsg.js
Normal file
39
plugins/commands/netmsg.js
Normal file
|
@ -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: ' <message>', // 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
|
||||||
|
}
|
Loading…
Reference in a new issue