GramIO API Reference / @gramio/contexts/dist / PollAttachment
Class: PollAttachment
Defined in: contexts/index.d.ts:653
This object contains information about a poll.
Extends
Constructors
Constructor
new PollAttachment(
payload):PollAttachment
Defined in: contexts/index.d.ts:605
Parameters
| Parameter | Type |
|---|---|
payload | TelegramPoll |
Returns
PollAttachment
Inherited from
Properties
| Property | Type | Inherited from | Defined in |
|---|---|---|---|
attachmentType | AttachmentType | Attachment.attachmentType | contexts/index.d.ts:654 |
payload | TelegramPoll | Poll.payload | contexts/index.d.ts:604 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:607
Returns
string
Inherited from
allowsMultipleAnswers
Get Signature
get allowsMultipleAnswers():
boolean
Defined in: contexts/index.d.ts:627
true, if the poll allows multiple answers
Returns
boolean
Inherited from
closeDate
Get Signature
get closeDate():
number
Defined in: contexts/index.d.ts:649
Point in time (Unix timestamp) when the poll will be automatically closed
Returns
number
Inherited from
correctOptionId
Get Signature
get correctOptionId():
number
Defined in: contexts/index.d.ts:633
0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
Returns
number
Inherited from
explanation
Get Signature
get explanation():
string
Defined in: contexts/index.d.ts:638
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
Returns
string
Inherited from
explanationEntities
Get Signature
get explanationEntities():
MessageEntity[]
Defined in: contexts/index.d.ts:643
Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
Returns
Inherited from
id
Get Signature
get id():
string
Defined in: contexts/index.d.ts:609
Unique poll identifier
Returns
string
Inherited from
openPeriod
Get Signature
get openPeriod():
number
Defined in: contexts/index.d.ts:645
Amount of time in seconds the poll will be active after creation
Returns
number
Inherited from
options
Get Signature
get options():
PollOption[]
Defined in: contexts/index.d.ts:617
List of poll options
Returns
Inherited from
question
Get Signature
get question():
string
Defined in: contexts/index.d.ts:611
Poll question, 1-300 characters
Returns
string
Inherited from
questionEntities
Get Signature
get questionEntities():
MessageEntity[]
Defined in: contexts/index.d.ts:615
Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions
Returns
Inherited from
totalVoterCount
Get Signature
get totalVoterCount():
number
Defined in: contexts/index.d.ts:619
Total number of users that voted in the poll
Returns
number
Inherited from
type
Get Signature
get type():
TelegramPollType
Defined in: contexts/index.d.ts:625
Poll type, currently can be regular or quiz
Returns
Inherited from
Methods
isAnonymous()
isAnonymous():
boolean
Defined in: contexts/index.d.ts:623
true, if the poll is anonymous
Returns
boolean
Inherited from
isClosed()
isClosed():
boolean
Defined in: contexts/index.d.ts:621
true, if the poll is closed
Returns
boolean