mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-30 13:03:39 +00:00
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import type {
|
|
ButtonInteraction,
|
|
CommandInteraction,
|
|
StringSelectMenuInteraction,
|
|
} from "@buape/carbon";
|
|
import type { ChatCommandDefinition, CommandArgs } from "openclaw/plugin-sdk/command-auth";
|
|
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
|
|
import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
import type { ThreadBindingManager } from "./thread-bindings.js";
|
|
|
|
type DiscordConfig = NonNullable<OpenClawConfig["channels"]>["discord"];
|
|
|
|
export type DispatchDiscordCommandInteractionParams = {
|
|
interaction: CommandInteraction | ButtonInteraction | StringSelectMenuInteraction;
|
|
prompt: string;
|
|
command: ChatCommandDefinition;
|
|
commandArgs?: CommandArgs;
|
|
cfg: OpenClawConfig;
|
|
discordConfig: DiscordConfig;
|
|
accountId: string;
|
|
sessionPrefix: string;
|
|
preferFollowUp: boolean;
|
|
threadBindings: ThreadBindingManager;
|
|
responseEphemeral?: boolean;
|
|
suppressReplies?: boolean;
|
|
};
|
|
|
|
export type DispatchDiscordCommandInteractionResult = {
|
|
accepted: boolean;
|
|
effectiveRoute?: ResolvedAgentRoute;
|
|
};
|
|
|
|
export type DispatchDiscordCommandInteraction = (
|
|
params: DispatchDiscordCommandInteractionParams,
|
|
) => Promise<DispatchDiscordCommandInteractionResult>;
|