mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-22 14:41:34 +00:00
fix: stabilize telegram contract runtime coverage
This commit is contained in:
@@ -1,9 +1,25 @@
|
||||
import type { PluginRuntime } from "openclaw/plugin-sdk/core";
|
||||
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
||||
|
||||
type TelegramChannelRuntime = {
|
||||
probeTelegram?: typeof import("./probe.js").probeTelegram;
|
||||
collectTelegramUnmentionedGroupIds?: typeof import("./audit.js").collectTelegramUnmentionedGroupIds;
|
||||
auditTelegramGroupMembership?: typeof import("./audit.js").auditTelegramGroupMembership;
|
||||
monitorTelegramProvider?: typeof import("./monitor.js").monitorTelegramProvider;
|
||||
sendMessageTelegram?: typeof import("./send.js").sendMessageTelegram;
|
||||
resolveTelegramToken?: typeof import("./token.js").resolveTelegramToken;
|
||||
messageActions?: typeof import("./channel-actions.js").telegramMessageActions;
|
||||
};
|
||||
|
||||
export type TelegramRuntime = PluginRuntime & {
|
||||
channel: PluginRuntime["channel"] & {
|
||||
telegram?: TelegramChannelRuntime;
|
||||
};
|
||||
};
|
||||
|
||||
const {
|
||||
setRuntime: setTelegramRuntime,
|
||||
clearRuntime: clearTelegramRuntime,
|
||||
getRuntime: getTelegramRuntime,
|
||||
} = createPluginRuntimeStore<PluginRuntime>("Telegram runtime not initialized");
|
||||
} = createPluginRuntimeStore<TelegramRuntime>("Telegram runtime not initialized");
|
||||
export { clearTelegramRuntime, getTelegramRuntime, setTelegramRuntime };
|
||||
|
||||
Reference in New Issue
Block a user