mast/telegram-bot-api

callback_query keeps being called

ecdeveloper opened this issue · 1 comments

My bot used to ask question with an inline keyboard markup. Whenever you click a button, it emits the callback_query. At some point I realized that it keeps firing this event even when I don't click the button.
I end up commenting out almost everything, my bot's app looks like this now:

'use strict';

const config = require('./config');
const TelegramBot = require('node-telegram-bot-api');
const token = config.tg_token;
const bot = new TelegramBot(token, {polling: true});
const debug = require('debug')('my-bot');

bot.on('callback_query', cbData => {
  debug("bot.on callback_query", cbData);
});

And when I start the app, it keeps firing this callback every 10-ish seconds. Any ideas why and how to debug that weird behavior?

mast commented

you are using different framework, please report bug there