grammY — Complete Examples
Index of end-to-end scenario walkthroughs. Each scenario lives in references/scenarios/ and is a fully runnable file with imports, types, and entry point — copy/paste ready.
| Scenario | Goal | File |
|---|---|---|
| Echo bot | Smallest possible bot — long polling, replies to any message | references/scenarios/echo-bot.md |
| Menu + callbacks bot | Inline keyboard with state, edits message in place | references/scenarios/menu-and-callbacks-bot.md |
| Form conversation bot | Multi-step input wizard using @grammyjs/conversations |
references/scenarios/form-conversation-bot.md |
| Session counter bot | Per-user persistent counter using session |
references/scenarios/session-counter-bot.md |
| Webhook on Cloudflare Workers | Production deploy, no servers | references/scenarios/webhook-on-cloudflare-workers.md |
When to use this skill vs others
| Want | Use |
|---|---|
| Smallest reproducible example for a feature | This skill — open the right scenario file |
| Reference for a specific method signature | api-reference |
| Idiomatic patterns explained | sdk-patterns / filter-queries / sessions / etc. |
| Plugin overview | plugins-catalog |
| Why something is broken | troubleshoot |
Reading order if you're new to grammY
references/scenarios/echo-bot.md— get the dev loop running.references/scenarios/session-counter-bot.md— add state.references/scenarios/menu-and-callbacks-bot.md— add interaction.references/scenarios/form-conversation-bot.md— multi-step flows.references/scenarios/webhook-on-cloudflare-workers.md— production deploy.