This commit is contained in:
2025-01-17 23:35:11 +09:00
parent 630862c8ee
commit 2e259c5404

View File

@@ -10,18 +10,12 @@ class InstancePlugin extends BaseInstancePlugin {
onControllerConnectionEvent(event) {
if (event === "connect") {
for (let [action, content] of this.messageQueue) {
this.sendChat(action, content);
this.instance.sendTo("controller", new InstanceActionEvent(this.instance.name, action, content));
}
this.messageQueue = [];
}
}
sendChat(action, content) {
this.instance.sendTo("controller",
new InstanceActionEvent(this.instance.name, action, content)
);
}
async onOutput(output) {
if (output.type == "action") {
this.messageQueue.push([output.action, output.message]);