We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guys, I'm stuck. I don't receive any message. Why? Please help.
#include <stdio.h> #include <tgbot/tgbot.h>
#include "config.h" #include "logger.h"
namespace broker { class telegram_bot { public: TgBot::Bot bot;
telegram_bot() : bot(config::telegram_bot.token) { bot.getEvents().onAnyMessage(std::bind(&telegram_bot::on_start, this, std::placeholders::_1)); new std::thread(&telegram_bot::work, this); } void work() { try { TgBot::TgLongPoll longPoll(bot); while (true) { LOG_INFO << "[telegram_bot] " << " Long pool started"; longPoll.start(); } LOG_INFO << "[telegram_bot] " << " Exit"; } catch (const std::exception &e) { LOG_ERROR << "[telegram_bot] " << " error: " << e.what(); } } void on_start(const TgBot::Message::Ptr message) { cout << "work" << endl; } };
}
The text was updated successfully, but these errors were encountered:
going deeper into investigation I've created simple bot form main example and found that
TgBot::Bot bot(,,,); bot.getApi().deleteWebhook();
just hangs w/o any exception or return
Sorry, something went wrong.
No branches or pull requests
Guys,
I'm stuck.
I don't receive any message. Why?
Please help.
#include <stdio.h>
#include <tgbot/tgbot.h>
#include "config.h"
#include "logger.h"
namespace broker
{
class telegram_bot
{
public:
TgBot::Bot bot;
}
The text was updated successfully, but these errors were encountered: