added help command and message
This commit is contained in:
parent
968f921398
commit
665479bb9f
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue