Closed naumoff1337 closed 9 months ago
Just need to use ctx.scenes.enter()
with await
.
Update this in the README.md
file and in tests/lib/bot.ts
Both the README and the test bot code are correct.
The README examples include explicit await:
The test bot directly returns a promise which is then awaited by the upstream:
In your code above, you replaced the expression arrow function with the statement arrow function and created a dangling promise inside of it. That broke things indeed, as the middleware was finishing, unwinding the stack and saving the state too early (before the dangling promise had completed). Glad you've figured this out.
Is there any possibility to use grammy-scenes together with some Storage Adapter, for example TypeORM storage adapter?
The above code doesn't work because it doesn't save the scene state to the database.