diff --git a/extensions/discord/src/actions/handle-action.ts b/extensions/discord/src/actions/handle-action.ts index b0842ce25b2..4beb7d76de4 100644 --- a/extensions/discord/src/actions/handle-action.ts +++ b/extensions/discord/src/actions/handle-action.ts @@ -8,7 +8,9 @@ import { readDiscordParentIdParam } from "../../../../src/agents/tools/discord-a import { handleDiscordAction } from "../../../../src/agents/tools/discord-actions.js"; import { resolveReactionMessageId } from "../../../../src/channels/plugins/actions/reaction-message-id.js"; import type { ChannelMessageActionContext } from "../../../../src/channels/plugins/types.js"; +import { normalizeInteractiveReply } from "../../../../src/interactive/payload.js"; import { readBooleanParam } from "../../../../src/plugin-sdk/boolean-param.js"; +import { buildDiscordInteractiveComponents } from "../shared-interactive.js"; import { resolveDiscordChannelId } from "../targets.js"; import { tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin.js"; @@ -40,7 +42,9 @@ export async function handleDiscordMessageAction( if (action === "send") { const to = readStringParam(params, "to", { required: true }); const asVoice = readBooleanParam(params, "asVoice") === true; - const rawComponents = params.components; + const rawComponents = + params.components ?? + buildDiscordInteractiveComponents(normalizeInteractiveReply(params.interactive)); const hasComponents = Boolean(rawComponents) && (typeof rawComponents === "function" || typeof rawComponents === "object");