#include <TelegramBot.h>
Definition at line 32 of file TelegramBot.h.
Telegram::TelegramBot::TelegramBot |
( |
| ) |
|
Telegram::TelegramBot::TelegramBot |
( |
std::string |
token | ) |
|
void Telegram::TelegramBot::addCommand |
( |
TCommand |
cmd | ) |
|
Adds a callback to the command list of the bot
- Parameters
-
Definition at line 44 of file TelegramBot.cc.
void Telegram::TelegramBot::apiRequest |
( |
std::string |
method, |
|
|
std::map< std::string, std::string > |
parameters |
|
) |
| |
|
private |
void Telegram::TelegramBot::apiRequestJson |
( |
std::string |
method, |
|
|
std::map< std::string, std::string > |
parameters |
|
) |
| |
|
private |
void Telegram::TelegramBot::init |
( |
void |
| ) |
|
|
private |
std::string Telegram::TelegramBot::processCommand |
( |
std::string |
cmd | ) |
|
|
private |
void Telegram::TelegramBot::processMessage |
( |
std::string |
message | ) |
|
Process incoming message
- Parameters
-
message | a std::string storing the message sent by the Telegram system |
Definition at line 74 of file TelegramBot.cc.
void Telegram::TelegramBot::sendMessage |
( |
std::string |
message, |
|
|
Json::Int64 |
chat_id |
|
) |
| |
void Telegram::TelegramBot::sendMessage |
( |
std::string |
message, |
|
|
std::string |
chat_id |
|
) |
| |
sendMessage sends a simple text message to a given chat (might be a user or a group)
Definition at line 98 of file TelegramBot.cc.
void Telegram::TelegramBot::sendPhoto |
( |
std::string |
URL, |
|
|
Json::Int64 |
chat_id |
|
) |
| |
Sends a picture from the internet to a chat
Definition at line 110 of file TelegramBot.cc.
void Telegram::TelegramBot::sendPhoto |
( |
std::string |
URL, |
|
|
std::string |
chat_id |
|
) |
| |
Sends a picture from the internet to a chat
Definition at line 118 of file TelegramBot.cc.
void Telegram::TelegramBot::setWebhook |
( |
std::string |
url | ) |
|
Set the webhook The web hook URL is like https://<your domain>="">/cgi-bin/mybot.cgi A web hook must be set before you can get any messages from the Telegram network!
- Parameters
-
url | a std::string with the URL of the hook |
Definition at line 60 of file TelegramBot.cc.
std::string Telegram::TelegramBot::api_url |
|
private |
Json::Int64 Telegram::TelegramBot::chat_id |
|
private |
The documentation for this class was generated from the following files: