grammyjs / grammY

The Telegram Bot Framework.
https://grammy.dev
MIT License
2.19k stars 110 forks source link

Is it possible to wait for the conversation to end? #489

Closed snurfer0 closed 11 months ago

snurfer0 commented 11 months ago

I am entering into a conversation inside a function, and even if I await the enter conversation function it does not wait for it to end.

                do: async (ctx) => {
                    await ctx.conversation.enter(REGISTER_CALLER_ACTION.ADD_USERNAME);
                    console.log('should log after the conversation has finished'); // its logging before
                    return true;
                },
KnorpelSenf commented 11 months ago

No. Conversations can live for days until they complete, and there may be server restarts in between. This cannot work.