grammyjs / grammyjs/conversations

feat: external events

Open
#19 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
65
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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
```ts
const session = await storage.read(chatId)
await fireEvent('id', conversation, session)
```
which loads the right session data, and runs the supplied conversation function.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how conversations currently wait for Telegram updates, then examine the proposed entry points `conversation.waitExternal('id')`, `storage.read(chatId)`, and `fireEvent('id', conversation, session)`. No files or tests are named, so first identify the conversation and storage paths involved. Done means an external event can resume the correct session and run the supplied conversation function.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.