added help command and message

main
Michael Mandl 2018-04-09 21:33:23 +02:00
parent 968f921398
commit 665479bb9f
1 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,18 @@ int main(int argc, char **argv)
api.sendMessage(std::to_string(message.chat.id), "pong");
}, "/ping");
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),
"Bot commands:\n"
"/ping \tsend life-sign\n"
"/help \tshow this message"
);
}, "/help");
bot.callback([&wiki, &settings](const tgbot::types::Message message,
const tgbot::methods::Api &api)
{