@ -38,6 +38,9 @@ namespace Telegram {
void addCommand(TCommand);
void setWebhook(std::string);
void processMessage(std::string);
Telegram::User* getMe(void);
Telegram::Message* sendMessage(std::string, Json::Int64);
Telegram::Message* sendMessage(std::string, std::string);
@ -84,6 +84,16 @@ void Telegram::TelegramBot::processMessage(std::string message) {
}
Telegram::User *Telegram::TelegramBot::getMe(void) {
Json::Value obj;
std::map<std::string, std::string> params;
obj = this->apiRequestJson("getMe", params);
return(new Telegram::User(obj["result"]));
/**
* Send a text message to a user
*/