Files
openclaw/extensions/telegram/src/runtime.ts
2026-03-04 01:21:30 -05:00

15 lines
343 B
TypeScript

import type { PluginRuntime } from "openclaw/plugin-sdk/telegram";
let runtime: PluginRuntime | null = null;
export function setTelegramRuntime(next: PluginRuntime) {
runtime = next;
}
export function getTelegramRuntime(): PluginRuntime {
if (!runtime) {
throw new Error("Telegram runtime not initialized");
}
return runtime;
}