tgbot-cpp
Loading...
Searching...
No Matches
TgBot::Poll Class Reference

This object contains information about a poll. More...

#include <Poll.h>

Public Types

typedef std::shared_ptr< PollPtr
 

Public Attributes

std::string id
 Unique poll identifier.
 
std::string question
 Poll question, 1-255 characters.
 
std::vector< PollOption::Ptroptions
 List of poll options.
 
std::int32_t totalVoterCount
 Total number of users that voted in the poll.
 
bool isClosed
 True, if the poll is closed.
 
bool isAnonymous
 True, if the poll is anonymous.
 
std::string type
 Poll type, currently can be “regular” or “quiz”
 
bool allowsMultipleAnswers
 True, if the poll allows multiple answers.
 
std::int32_t correctOptionId
 Optional. 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.
 
std::string explanation
 Optional. 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.
 
std::vector< MessageEntity::PtrexplanationEntities
 Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation.
 
std::int32_t openPeriod
 Optional. Amount of time in seconds the poll will be active after creation.
 
std::int64_t closeDate
 Optional. Point in time (Unix timestamp) when the poll will be automatically closed.
 

Detailed Description

This object contains information about a poll.

Definition at line 19 of file Poll.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Poll> TgBot::Poll::Ptr

Definition at line 22 of file Poll.h.

Member Data Documentation

◆ allowsMultipleAnswers

bool TgBot::Poll::allowsMultipleAnswers

True, if the poll allows multiple answers.

Definition at line 62 of file Poll.h.

◆ closeDate

std::int64_t TgBot::Poll::closeDate

Optional. Point in time (Unix timestamp) when the poll will be automatically closed.

Definition at line 88 of file Poll.h.

◆ correctOptionId

std::int32_t TgBot::Poll::correctOptionId

Optional. 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.

Definition at line 68 of file Poll.h.

◆ explanation

std::string TgBot::Poll::explanation

Optional. 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.

Definition at line 73 of file Poll.h.

◆ explanationEntities

std::vector<MessageEntity::Ptr> TgBot::Poll::explanationEntities

Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation.

Definition at line 78 of file Poll.h.

◆ id

std::string TgBot::Poll::id

Unique poll identifier.

Definition at line 27 of file Poll.h.

◆ isAnonymous

bool TgBot::Poll::isAnonymous

True, if the poll is anonymous.

Definition at line 52 of file Poll.h.

◆ isClosed

bool TgBot::Poll::isClosed

True, if the poll is closed.

Definition at line 47 of file Poll.h.

◆ openPeriod

std::int32_t TgBot::Poll::openPeriod

Optional. Amount of time in seconds the poll will be active after creation.

Definition at line 83 of file Poll.h.

◆ options

std::vector<PollOption::Ptr> TgBot::Poll::options

List of poll options.

Definition at line 37 of file Poll.h.

◆ question

std::string TgBot::Poll::question

Poll question, 1-255 characters.

Definition at line 32 of file Poll.h.

◆ totalVoterCount

std::int32_t TgBot::Poll::totalVoterCount

Total number of users that voted in the poll.

Definition at line 42 of file Poll.h.

◆ type

std::string TgBot::Poll::type

Poll type, currently can be “regular” or “quiz”

Definition at line 57 of file Poll.h.


The documentation for this class was generated from the following file: