This commit is contained in:
2025-08-14 12:47:49 +09:00
parent 0e5d8b5d9c
commit 56e20d0a5d
3 changed files with 15 additions and 7 deletions

View File

@@ -1,24 +0,0 @@
import { Type, Static } from "@sinclair/typebox";
export class ChatEvent {
declare ["constructor"]: typeof ChatEvent;
static type = "event" as const;
static src = ["control", "instance"] as const;
static dst = "instance" as const;
static plugin = "global_chat" as const;
static permission = null;
constructor(
public instanceName: string,
public content: string,
) {
}
static jsonSchema = Type.Object({
"instanceName": Type.String(),
"content": Type.String(),
});
static fromJSON(json: Static<typeof ChatEvent.jsonSchema>) {
return new this(json.instanceName, json.content);
}
}