Skip to content

How can I do Back Button work with custom keyboard? #1593

Answered by MKRhere
Sodikjon asked this question in Q&A
Discussion options

You must be logged in to vote

If you have only one main state (to which you can ever go "back" to), you can simply attach the same listener for ctx.command("course", main) and ctx.hears("Back", main).

If you will have nested states ("Back" may lead to multiple previous menus), you may need to use Scenes. Consider checking out this post: https://dev.to/maklut/telegraf-vs-node-telegram-bot-api-36fk#telegraf-scenes

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sodikjon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants