Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: external events #19

Open
KnorpelSenf opened this issue Jul 29, 2022 · 0 comments
Open

feat: external events #19

KnorpelSenf opened this issue Jul 29, 2022 · 0 comments

Comments

@KnorpelSenf
Copy link
Member

It may be interesting to be able to wait for external events, rather than just waiting for Telegram updates.

For example, we could add something like await conversation.waitExternal('id') and then in turn people can do

const session = await storage.read(chatId)
await fireEvent('id', conversation, session)

which loads the right session data, and runs the supplied conversation function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: To do
Development

No branches or pull requests

1 participant