mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Remove control plugin
This commit is contained in:
1 parent
2ffb848fe6
commit
f72995ec8b
1 file changed
-30
@@ -1,30 +0,0 @@
|
||||
"use strict";
|
||||
const libPlugin = require("@clusterio/lib/plugin");
|
||||
const info = require("./info");
|
||||
const libCommand = require("@clusterio/lib/command");
|
||||
|
||||
|
||||
const globalChatCommands = new libCommand.CommandTree({
|
||||
name: "global-chat", description: "Global Chat plugin commands",
|
||||
});
|
||||
globalChatCommands.add(new libCommand.Command({
|
||||
definition: ["shout <message>", "Send message to all instances", (yargs) => {
|
||||
yargs.positional("message", { describe: "message to send", type: "string" });
|
||||
}],
|
||||
handler: async function(args, control) {
|
||||
await info.messages.chat.send(control, {
|
||||
instance_name: "Console",
|
||||
content: args.message,
|
||||
});
|
||||
},
|
||||
}));
|
||||
|
||||
class ControlPlugin extends libPlugin.BaseControlPlugin {
|
||||
async addCommands(rootCommand) {
|
||||
rootCommand.add(globalChatCommands);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ControlPlugin,
|
||||
};
|
||||
Reference in new issue
Block a user