added /ping command
This commit is contained in:
parent
b6d06beebf
commit
968f921398
1 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,15 @@ int main(int argc, char **argv)
|
|||
settings.wikiUser, settings.wikiPassword);
|
||||
|
||||
tgbot::LongPollBot bot(settings.telegramToken);
|
||||
|
||||
bot.callback(tgbot::utils::whenStarts, [](
|
||||
const tgbot::types::Message message,
|
||||
const tgbot::methods::Api &api,
|
||||
const std::vector<std::string> args)
|
||||
{
|
||||
api.sendMessage(std::to_string(message.chat.id), "pong");
|
||||
}, "/ping");
|
||||
|
||||
bot.callback([&wiki, &settings](const tgbot::types::Message message,
|
||||
const tgbot::methods::Api &api)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue