From 665479bb9f5f3fd9c020c77e9b7036083459451c Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 9 Apr 2018 21:33:23 +0200 Subject: [PATCH] added help command and message --- BeezleBot/BeezleBot.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BeezleBot/BeezleBot.cpp b/BeezleBot/BeezleBot.cpp index a6c5671..257581c 100644 --- a/BeezleBot/BeezleBot.cpp +++ b/BeezleBot/BeezleBot.cpp @@ -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 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) {