From 9a5e617a55597e195987d22d36db6b12cb645507 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 15 Feb 2026 18:53:24 +0000 Subject: [PATCH] fix(discord): align message action send parameters --- src/agents/tools/discord-actions-messaging.ts | 1 - src/channels/plugins/actions/discord/handle-action.ts | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/agents/tools/discord-actions-messaging.ts b/src/agents/tools/discord-actions-messaging.ts index 6f2552c9ff2..1097d48a00c 100644 --- a/src/agents/tools/discord-actions-messaging.ts +++ b/src/agents/tools/discord-actions-messaging.ts @@ -1,7 +1,6 @@ import type { AgentToolResult } from "@mariozechner/pi-agent-core"; import type { DiscordActionConfig } from "../../config/config.js"; import type { DiscordSendComponents, DiscordSendEmbeds } from "../../discord/send.shared.js"; -import { readDiscordComponentSpec } from "../../discord/components.js"; import { createThreadDiscord, deleteMessageDiscord, diff --git a/src/channels/plugins/actions/discord/handle-action.ts b/src/channels/plugins/actions/discord/handle-action.ts index 469b4a7da89..3a5f2baa359 100644 --- a/src/channels/plugins/actions/discord/handle-action.ts +++ b/src/channels/plugins/actions/discord/handle-action.ts @@ -37,14 +37,11 @@ export async function handleDiscordMessageAction( const asVoice = params.asVoice === true; const rawComponents = params.components; const components = - rawComponents && - (Array.isArray(rawComponents) || - typeof rawComponents === "function" || - (typeof rawComponents === "object" && !Array.isArray(rawComponents))) + rawComponents && (Array.isArray(rawComponents) || typeof rawComponents === "function") ? rawComponents : undefined; const content = readStringParam(params, "message", { - required: !asVoice && !components, + required: !asVoice, allowEmpty: true, }); // Support media, path, and filePath for media URL