This commit is contained in:
2025-08-15 19:14:56 +09:00
parent f5f3de125a
commit 8446a467a3
9 changed files with 367 additions and 260 deletions

View File

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