Skip to content

export Class

PollOptions ​

extends ​

Builder

Constructor ​

ts
 new PollOptions( ...options )
ParameterTypeDescription
...optionsPollOption[]The options of a poll to be sent.

Methods ​

add( text, text_parse_mode, text_entities ) ​

ParameterTypeDescription
textstringOption text, 1-100 characters
text_parse_mode?stringMode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed.
text_entities?MessageEntities | MessageEntityPayload[]List of special entities that appear in the poll option text. It can be specified instead of text_parse_mode.

Adds an option to the current builder.

Returns: PollOptions

A modern, powerful library for building your Telegram bots, with seamless support for both JavaScript and Typescript.