Skip to content

GramIO API Reference / gramio/dist / SendPollParams

Interface: SendPollParams

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

Params object for sendPoll method

Properties

PropertyTypeDescriptionDefined in
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:1440
allows_multiple_answers?booleanTrue, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False@gramio/types/out/params.d.ts:1400
business_connection_id?stringUnique identifier of the business connection on behalf of which the message will be sent@gramio/types/out/params.d.ts:1364
chat_idstring | numberUnique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats.@gramio/types/out/params.d.ts:1368
close_date?numberPoint in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.@gramio/types/out/params.d.ts:1424
correct_option_id?number0-based identifier of the correct answer option, required for polls in quiz mode@gramio/types/out/params.d.ts:1404
disable_notification?booleanSends the message silently. Users will receive a notification with no sound.@gramio/types/out/params.d.ts:1432
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:1408
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:1416
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:1412
is_anonymous?booleanTrue, if the poll needs to be anonymous, defaults to True@gramio/types/out/params.d.ts:1392
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:1428
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:1444
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:1372
open_period?numberAmount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.@gramio/types/out/params.d.ts:1420
optionsTelegramInputPollOption[]A JSON-serialized list of 2-12 answer options@gramio/types/out/params.d.ts:1388
protect_content?booleanProtects the contents of the sent message from forwarding and saving@gramio/types/out/params.d.ts:1436
questionstring | { toString: string; }Poll question, 1-300 characters@gramio/types/out/params.d.ts:1376
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:1384
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:1380
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:1452
reply_parameters?TelegramReplyParametersDescription of the message to reply to@gramio/types/out/params.d.ts:1448
type?SendPollTypePoll type, “quiz” or “regular”, defaults to “regular”@gramio/types/out/params.d.ts:1396