fix(discord): align message action send parameters

This commit is contained in:
Peter Steinberger
2026-02-15 18:53:24 +00:00
parent 6f2f88d3ad
commit 9a5e617a55
2 changed files with 2 additions and 6 deletions

View File

@@ -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