feat(telegram): add sendPoll support (#16193) (#16209)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b58492cfed34eebe4b32af5292928092a11ecfed
Co-authored-by: robbyczgw-cla <239660374+robbyczgw-cla@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
Robby
2026-02-14 18:34:30 +01:00
committed by GitHub
parent fc5d147d1b
commit 8e5689a84d
21 changed files with 364 additions and 11 deletions

View File

@@ -15,8 +15,17 @@ export function registerMessagePollCommand(message: Command, helpers: MessageCli
[] as string[],
)
.option("--poll-multi", "Allow multiple selections", false)
.option("--poll-duration-hours <n>", "Poll duration (Discord)")
.option("--poll-duration-hours <n>", "Poll duration in hours (Discord)")
.option("--poll-duration-seconds <n>", "Poll duration in seconds (Telegram; 5-600)")
.option("--poll-anonymous", "Send an anonymous poll (Telegram)", false)
.option("--poll-public", "Send a non-anonymous poll (Telegram)", false)
.option("-m, --message <text>", "Optional message body")
.option(
"--silent",
"Send poll silently without notification (Telegram + Discord where supported)",
false,
)
.option("--thread-id <id>", "Thread id (Telegram forum topic / Slack thread ts)")
.action(async (opts) => {
await helpers.runMessageAction("poll", opts);
});