0

I have code like bellow, I have 3 step form which I would like to pass variables from step 1 to step 2 and then step 3.

bot.action('BuyService',(ctx)=>{
    ctx.deleteMessage()
    ctx.reply('first step text', {
        reply_markup: {
            inline_keyboard: [
    [{ text: "1month", callback_data: 'step2'},{ text: "2month", callback_data: "step2" }],
    [{ text: "3month", callback_data: "step2" }]
            ]}})
})

and step 2 is :

bot.action('step2',(ctx)=>{
    "i want text of pressed button(1month,2month...) in here and pass all data to another step"
})

how can I make this possible ?

I would like to transfer pressed button texts from step 1 to step 2 and then all data to step 3 which all handle by button callbacks

ikolo
  • 1

0 Answers0