mast / telegram-bot-api

First Telegram Bot API node.js library
http://mast.github.io/telegram-bot-api/
MIT License
246 stars 64 forks source link

callback_query keeps being called #53

Closed ecdeveloper closed 4 years ago

ecdeveloper commented 6 years ago

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 4 years ago

you are using different framework, please report bug there