This commit is contained in:
sliverp
2026-01-28 17:36:53 +08:00
parent 9a531cd6eb
commit 6154e4f9e1
5 changed files with 154 additions and 46 deletions

14
src/runtime.ts Normal file
View File

@@ -0,0 +1,14 @@
import type { PluginRuntime } from "clawdbot/plugin-sdk";
let runtime: PluginRuntime | null = null;
export function setQQBotRuntime(next: PluginRuntime) {
runtime = next;
}
export function getQQBotRuntime(): PluginRuntime {
if (!runtime) {
throw new Error("QQBot runtime not initialized");
}
return runtime;
}