-
Hello, I am trying to handle the case for invalid token
Here's my code snippet:
``` js
const callback = async (req, res) => {
try {
const bot = new telegramBot(req.body.token+'s', {
poll…
-
As in the demo, all the callback is lambda:
https://github.com/reo7sp/tgbot-cpp/blob/master/samples/echobot-curl-client/src/main.cpp#L18
how to bind a function handler?
-
2019-02-14 08:18:28,165 - tg_bot - INFO - Not loading: ['translation', 'rss', 'sed']
2019-02-14 08:18:28,165 - tg_bot - INFO - Modules to load: ['admin', 'afk', 'antiflood', 'backups', 'bans', 'black…
-
```
if (args.at(0) == "Dx" + std::to_string(constants::ENGAGEMENT_AMOUNT) || args.at(0) == "dx" + std::to_string(constants::ENGAGEMENT_AMOUNT))
{
//###irrelavant code for now
}
else
{
if …
-
```
bot.getEvents().onCommand("test", [&bot](TgBot::Message::Ptr message)
{
if (message->replyToMessage)
{
TgBot::User::Ptr chatMember = message->replyToMessage->from;
bot.getApi().s…
-
```
if (args.at(0) == "Dx" + std::to_string(constants::ENGAGEMENT_AMOUNT) || args.at(0) == "dx" + std::to_string(constants::ENGAGEMENT_AMOUNT))
{
//###irrelavant code for now
}
else
{
if …
-
```
if (args.at(0) == "Dx" + std::to_string(constants::ENGAGEMENT_AMOUNT) || args.at(0) == "dx" + std::to_string(constants::ENGAGEMENT_AMOUNT))
{
//###irrelavant code for now
}
else
{
if …
-
```
if (args.at(0) == "Dx" + std::to_string(constants::ENGAGEMENT_AMOUNT) || args.at(0) == "dx" + std::to_string(constants::ENGAGEMENT_AMOUNT))
{
//###irrelavant code for now
}
else
{
if …
-
```
if (args.at(0) == "Dx" + std::to_string(constants::ENGAGEMENT_AMOUNT) || args.at(0) == "dx" + std::to_string(constants::ENGAGEMENT_AMOUNT))
{
//###irrelavant code for now
}
else
{
if …
-
```
if (args.at(0) == "Dx" + std::to_string(constants::ENGAGEMENT_AMOUNT) || args.at(0) == "dx" + std::to_string(constants::ENGAGEMENT_AMOUNT))
{
//###irrelavant code for now
}
else
{
if …