feat: unify poll support

Co-authored-by: DBH <5251425+dbhurley@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-06 04:43:35 +00:00
parent 1f4d9e83ff
commit 0b27964693
19 changed files with 360 additions and 118 deletions

View File

@@ -126,9 +126,10 @@ export async function handleDiscordMessagingAction(
typeof durationRaw === "number" && Number.isFinite(durationRaw)
? durationRaw
: undefined;
const maxSelections = allowMultiselect ? Math.max(2, answers.length) : 1;
await sendPollDiscord(
to,
{ question, answers, allowMultiselect, durationHours },
{ question, options: answers, maxSelections, durationHours },
{ content },
);
return jsonResult({ ok: true });