Reapply "."

This reverts commit 685260080e.
This commit is contained in:
2025-08-15 20:07:44 +09:00
parent 685260080e
commit 6057a62d50
14 changed files with 364 additions and 470 deletions

33
message.js Normal file
View File

@@ -0,0 +1,33 @@
// 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);
}
}