added /ping command

main
Michael Mandl 2018-04-09 20:33:22 +02:00
parent b6d06beebf
commit 968f921398
1 changed files with 9 additions and 0 deletions

View File

@ -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)
{