tgbot-cpp
Loading...
Searching...
No Matches
Poll.h
Go to the documentation of this file.
1#ifndef TGBOT_POLL_H
2#define TGBOT_POLL_H
3
6
7#include <cstdint>
8#include <memory>
9#include <string>
10#include <vector>
11
12namespace TgBot {
13
19class Poll {
20
21public:
22 typedef std::shared_ptr<Poll> Ptr;
23
27 std::string id;
28
32 std::string question;
33
37 std::vector<PollOption::Ptr> options;
38
42 std::int32_t totalVoterCount;
43
48
53
57 std::string type;
58
63
68 std::int32_t correctOptionId;
69
73 std::string explanation;
74
78 std::vector<MessageEntity::Ptr> explanationEntities;
79
83 std::int32_t openPeriod;
84
88 std::int64_t closeDate;
89};
90}
91
92#endif //TGBOT_POLL_H
This object contains information about a poll.
Definition Poll.h:19
std::int64_t closeDate
Optional. Point in time (Unix timestamp) when the poll will be automatically closed.
Definition Poll.h:88
bool isAnonymous
True, if the poll is anonymous.
Definition Poll.h:52
std::int32_t correctOptionId
Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode,...
Definition Poll.h:68
std::vector< PollOption::Ptr > options
List of poll options.
Definition Poll.h:37
bool isClosed
True, if the poll is closed.
Definition Poll.h:47
std::string id
Unique poll identifier.
Definition Poll.h:27
std::shared_ptr< Poll > Ptr
Definition Poll.h:22
std::int32_t openPeriod
Optional. Amount of time in seconds the poll will be active after creation.
Definition Poll.h:83
bool allowsMultipleAnswers
True, if the poll allows multiple answers.
Definition Poll.h:62
std::string explanation
Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a qu...
Definition Poll.h:73
std::string type
Poll type, currently can be “regular” or “quiz”
Definition Poll.h:57
std::string question
Poll question, 1-255 characters.
Definition Poll.h:32
std::vector< MessageEntity::Ptr > explanationEntities
Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation.
Definition Poll.h:78
std::int32_t totalVoterCount
Total number of users that voted in the poll.
Definition Poll.h:42
Definition Api.h:40