grammyjs / grammyjs/conversations

Clarify error: “Cannot wait for updates from inside external…” should mention Bot API calls

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

Description

When using conversation.external(), I encountered errors like:

`Cannot wait for updates from inside external, or concurrently to it!
Bad replay, expected op 'getFile'`

The root cause was that I was making Bot API calls (ctx.api.getFile, ctx.reply, chat actions, etc.) inside the external block. Because external() bypasses the conversation's replay system, these Bot API operations were not being logged. This caused the replay log to go out of sync and triggered the errors.

### Suggested Documentation Improvement:

While the current documentation states that external is for "communication with external systems that does not go through grammY," it would be helpful to explicitly clarify that Bot API calls must not be made inside external() blocks.

This clarification would help prevent confusion and make the error messages more immediately understandable for developers.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the documentation for conversation.external() and the explanation of the “Cannot wait for updates from inside external” error. Clarify that Bot API calls such as ctx.api.getFile, ctx.reply, and chat actions must not run inside external() blocks, then verify that the guidance explains the replay failure described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.