mirror of https://github.com/openclaw/openclaw.git
21 lines
735 B
TypeScript
21 lines
735 B
TypeScript
import type { PluginRuntime } from "openclaw/plugin-sdk/core";
|
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
|
|
type DiscordChannelRuntime = {
|
|
messageActions?: typeof import("./channel-actions.js").discordMessageActions;
|
|
sendMessageDiscord?: typeof import("./send.js").sendMessageDiscord;
|
|
};
|
|
|
|
export type DiscordRuntime = PluginRuntime & {
|
|
channel: PluginRuntime["channel"] & {
|
|
discord?: DiscordChannelRuntime;
|
|
};
|
|
};
|
|
|
|
const {
|
|
setRuntime: setDiscordRuntime,
|
|
tryGetRuntime: getOptionalDiscordRuntime,
|
|
getRuntime: getDiscordRuntime,
|
|
} = createPluginRuntimeStore<DiscordRuntime>("Discord runtime not initialized");
|
|
export { getDiscordRuntime, getOptionalDiscordRuntime, setDiscordRuntime };
|