7 #include "register_callback.h" 8 #include "utils/https.h" 22 const char *what()
const noexcept
override {
return __what.c_str(); }
25 const std::string __what;
36 Bot& operator=(
const Bot&) =
default;
37 Bot& operator=(
Bot&&) =
default;
39 virtual ~
Bot() =
default;
41 virtual void start() {}
47 void notifyEachUpdate(
bool t);
50 template<
typename... TyArgs>
51 explicit Bot(TyArgs &&... many) : Api(std::forward<TyArgs>(many)...) {
52 utils::http::__internal_Curl_GlobalInit();
55 void makeCallback(
const std::vector<types::Update> &updates)
const;
58 bool __notifyEachUpdate{
false};
76 const std::vector<types::UpdateType> &filterUpdates = {},
77 const int &limit = 100,
const int &timeout = 60);
90 void start()
override;
107 WebhookBot(
const std::string &token) =
delete;
117 WebhookBot(
const std::string &token,
const std::string &url,
118 const int &maxConnections = 40,
119 const std::vector<types::UpdateType> &filterUpdates = {}) =
delete;
130 WebhookBot(
const std::string &token,
const std::string &url,
131 const std::string &certificate,
const int &maxConnections = 40,
132 const std::vector<types::UpdateType> &filterUpdates = {}) =
delete;
Webhook bot (see WebhookBot::start() function)
Definition: bot.h:96
registers and holds callbacks for each type of update
Definition: register_callback.h:24
Exception raised when Bot API reports some kind of error.
Definition: bot.h:18
Main tgbot namespace.
Definition: bot.h:13
Basic Bot interface.
Definition: bot.h:31
Long polling bot, (see LongPollBot::start() function)
Definition: bot.h:64
Contains Telegram bot API methods.
Definition: api.h:19