Skip to content

GramIO API Reference / @gramio/contexts/dist / PollOption

Class: PollOption

Defined in: contexts/index.d.ts:641

This object contains information about one answer option in a poll.

Documentation

Constructors

Constructor

new PollOption(payload): PollOption

Defined in: contexts/index.d.ts:643

Parameters

ParameterType
payloadTelegramPollOption

Returns

PollOption

Properties

PropertyTypeDefined in
payloadTelegramPollOptioncontexts/index.d.ts:642

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:645

MDN

Returns

string


addedByChat

Get Signature

get addedByChat(): Chat

Defined in: contexts/index.d.ts:667

Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll creation

Returns

Chat


addedByUser

Get Signature

get addedByUser(): User

Defined in: contexts/index.d.ts:663

Optional. User who added the option; omitted if the option wasn't added by a user after poll creation

Returns

User


additionDate

Get Signature

get additionDate(): number

Defined in: contexts/index.d.ts:671

Optional. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll

Returns

number


persistentId

Get Signature

get persistentId(): string

Defined in: contexts/index.d.ts:647

Unique identifier of the option, persistent on option addition and deletion

Returns

string


text

Get Signature

get text(): string

Defined in: contexts/index.d.ts:651

Option text, 1-100 characters

Returns

string


textEntities

Get Signature

get textEntities(): MessageEntity[]

Defined in: contexts/index.d.ts:655

Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts

Returns

MessageEntity[]


voterCount

Get Signature

get voterCount(): number

Defined in: contexts/index.d.ts:659

Number of users who voted for this option; may be 0 if unknown

Returns

number