Closed Quernest closed 3 years ago
Hey 🙋🏼♂️,
I faced such issue: I can't get the session object on the poll_answer ctx which is triggered after selecting an option in the quiz.
poll_answer
// command for sending quiz bot.command('quiz', async (ctx) => { // ✅ create session object with counter ctx.session = { counter: 0 }; ctx.telegram.sendQuiz(args); return ctx; }); bot.on('poll_answer', async (ctx) => { console.log(ctx.session); // ⛔️ undefined, unable to increment counter return ctx; });
Most likely this issue in the telegraf, so I opened it here: https://github.com/telegraf/telegraf/issues/1302
Hey 🙋🏼♂️,
I faced such issue: I can't get the session object on the
poll_answer
ctx which is triggered after selecting an option in the quiz.