Telegram Telegraf Bot Markup.inlineKeyboard callbacks work in private message but not in group chat

88 views Asked by At

Note: I am using stage and scenes for conversation flow, I've verified they are set up properly, I've also tried playing around with botfather settings (pretty much every possible option), gave the bot admin in the group chat. There are no other bots in the group.
Here's the keyboard:

ctx.reply('Use the buttons below to customize your bot', {
    ...Markup.inlineKeyboard([
         [Markup.button.callback(ctx.session.gif ? '✅ Gif / Media' : '❌ Gif / Media', 'gm'),
          Markup.button.callback(`Min Buy $${ctx.session.minBuy}`, 'mb')],

         [Markup.button.callback('Emoji', 'em'),  // TODO
          Markup.button.callback(`Step $${ctx.session.st}`, 'st')]
]),
});

Here's a callback:

setupScene.action('gm', (ctx) => {
    console.log(1);
    ctx.reply('➡️ Send gif / media');
    ctx.scene.state.step = 'gm';
});

Here's a part of the scene:

setupScene.on('message', async (ctx) => {
    if (ctx.scene.state.step === 'gm') {
         // code...
    } // ...
}

I've also tried bot.action instead of setupScene.action, but that obviously won't trigger setupScene.on so no luck.

The expected outcome is the buttons working normally, like they do in private message.

0

There are 0 answers