Skip to content

GramIO API Reference / gramio/dist / SendPollParams

Interface: SendPollParams

Defined in: @gramio/types/out/params.d.ts:1495

Params object for sendPoll method

Properties

PropertyTypeDescriptionDefined in
allow_adding_options?booleanPass True if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes@gramio/types/out/params.d.ts:1547
allow_paid_broadcast?booleanPass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.@gramio/types/out/params.d.ts:1619
allows_multiple_answers?booleanPass True if the poll allows multiple answers, defaults to False@gramio/types/out/params.d.ts:1535
allows_revoting?booleanPass True if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls@gramio/types/out/params.d.ts:1539
business_connection_id?stringUnique identifier of the business connection on behalf of which the message will be sent@gramio/types/out/params.d.ts:1499
chat_idstring | numberUnique identifier for the target chat or username of the target bot, supergroup or channel in the format @username. Polls can't be sent to channel direct messages chats.@gramio/types/out/params.d.ts:1503
close_date?numberPoint in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.@gramio/types/out/params.d.ts:1587
correct_option_ids?number[]A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode@gramio/types/out/params.d.ts:1563
country_codes?string[]A JSON-serialized list of 0-12 two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which users can vote in the poll; for channel chats only. Use “FT” as a country code to allow users with anonymous numbers to vote. If omitted or empty, then users from any country can participate in the poll.@gramio/types/out/params.d.ts:1559
description?string | { toString: string; }Description of the poll to be sent, 0-1024 characters after entities parsing@gramio/types/out/params.d.ts:1595
description_entities?TelegramMessageEntity[]A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode@gramio/types/out/params.d.ts:1603
description_parse_mode?"HTML" | "MarkdownV2" | "Markdown"Mode for parsing entities in the poll description. See formatting options for more details.@gramio/types/out/params.d.ts:1599
disable_notification?booleanSends the message silently. Users will receive a notification with no sound.@gramio/types/out/params.d.ts:1611
explanation?string | { toString: string; }Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing@gramio/types/out/params.d.ts:1567
explanation_entities?TelegramMessageEntity[]A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode.@gramio/types/out/params.d.ts:1575
explanation_media?TelegramInputPollMediaMedia added to the quiz explanation@gramio/types/out/params.d.ts:1579
explanation_parse_mode?"HTML" | "MarkdownV2" | "Markdown"Mode for parsing entities in the explanation. See formatting options for more details.@gramio/types/out/params.d.ts:1571
hide_results_until_closes?booleanPass True if poll results must be shown only after the poll closes@gramio/types/out/params.d.ts:1551
is_anonymous?booleanTrue, if the poll needs to be anonymous, defaults to True@gramio/types/out/params.d.ts:1527
is_closed?booleanPass True if the poll needs to be immediately closed. This can be useful for poll preview.@gramio/types/out/params.d.ts:1591
media?TelegramInputPollMediaMedia added to the poll description@gramio/types/out/params.d.ts:1607
members_only?booleanPass True if voting is limited to users who have been members of the chat where the poll is being sent for more than 24 hours; for channel chats only@gramio/types/out/params.d.ts:1555
message_effect_id?stringUnique identifier of the message effect to be added to the message; for private chats only@gramio/types/out/params.d.ts:1623
message_thread_id?numberUnique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only@gramio/types/out/params.d.ts:1507
open_period?numberAmount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.@gramio/types/out/params.d.ts:1583
optionsTelegramInputPollOption[]A JSON-serialized list of 1-12 answer options@gramio/types/out/params.d.ts:1523
protect_content?booleanProtects the contents of the sent message from forwarding and saving@gramio/types/out/params.d.ts:1615
questionstring | { toString: string; }Poll question, 1-300 characters@gramio/types/out/params.d.ts:1511
question_entities?TelegramMessageEntity[]A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode.@gramio/types/out/params.d.ts:1519
question_parse_mode?"HTML" | "MarkdownV2" | "Markdown"Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed.@gramio/types/out/params.d.ts:1515
reply_markup?TelegramInlineKeyboardMarkup | TelegramReplyKeyboardMarkup | TelegramReplyKeyboardRemove | TelegramForceReply | { toJSON: TelegramInlineKeyboardMarkup; } | { toJSON: TelegramReplyKeyboardMarkup; } | { toJSON: TelegramReplyKeyboardRemove; } | { toJSON: TelegramForceReply; }Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.@gramio/types/out/params.d.ts:1631
reply_parameters?TelegramReplyParametersDescription of the message to reply to@gramio/types/out/params.d.ts:1627
shuffle_options?booleanPass True if the poll options must be shown in random order@gramio/types/out/params.d.ts:1543
type?SendPollTypePoll type, “quiz” or “regular”, defaults to “regular”@gramio/types/out/params.d.ts:1531