-
Hello, there was a difficulty while working with this library, I need to update the menu when a certain button is pressed and then redirect to this new menu. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 16 replies
-
I assume you are using something like The following example returns to the parent menu after pressing the button. menuTemplate.choose('unique', ['walk', 'swim'], {
async do(ctx, key) {
await ctx.answerCallbackQuery(`Lets ${key}`)
// You can also go back to the parent menu afterwards for some 'quick' interactions in submenus
return '..'
}
}) Does that already help? |
Beta Was this translation helpful? Give feedback.
I assume you are using something like
choose
orselect
. You can return a relative path where to go in the menu after a button is pressed.The following example returns to the parent menu after pressing the button.
Does that already help?