Telegraf.js Scenes. Help please. #1907
-
Hello! Anyone help me what is my error?
Im tried to solve in this way:
But this way requiers double click on the switch button to reenter scene |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Right, so the issue is that you're listening on |
Beta Was this translation helpful? Give feedback.
If you don't need step 3, the solution is simple. Move your top-level actions under stage like so:
These will work identically to
bot.action
, with the exception that they intercept events before they enter scenes, and are still able to usectx.scene
. The downside is that buttons in buyScene will not work while user is in sellScene. At that point, you must wonder if the inline keyboard needs to be inside scenes at all.