mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Convert global_chat, research_sync and statistics_exporter to entrypoint functions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd609c3c54
commit
cfeb4b6a4a
7 files changed
+231
-237
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { CommandTree, Command } from "@clusterio/lib";
|
||||
import { BaseCtlPlugin } from "@clusterio/ctl";
|
||||
import type { CtlPluginContext } from "@clusterio/ctl";
|
||||
import { ChatEvent } from "./messages.js";
|
||||
|
||||
const globalChatCommands = new CommandTree({
|
||||
@@ -14,8 +14,8 @@ globalChatCommands.add(new Command({
|
||||
},
|
||||
}));
|
||||
|
||||
export class CtlPlugin extends BaseCtlPlugin {
|
||||
async addCommands(rootCommand: CommandTree) {
|
||||
export default async function(context: CtlPluginContext) {
|
||||
context.hooks.addCommands.attach(context.plugin.name, async (rootCommand) => {
|
||||
rootCommand.add(globalChatCommands);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user