grammY 2.0 Needs YouThe core library of grammY 2.0 is feature-complete now. Some work is still ahead before it will be released. We need your help to iron out rough edges and help us get experience with the migration.
BOT DEVELOPERS (brave ones only)
Please install the beta version of grammY in your bot project.
deno add jsr:@grammyjs/grammy@2.0.0-beta.6
npx jsr add @grammyjs/grammy@2.0.0-beta.6
pnpm i jsr:@grammyjs/grammy@2.0.0-beta.6
yarn add jsr:@grammyjs/grammy@2.0.0-beta.6
bunx jsr add @grammyjs/grammy@2.0.0-beta.6
Everything will break and there is no migration guide. There is only this much information:
1. replace all
ctx.reply calls with
ctx.send calls
2. replace all
ctx.replyWithVideo calls with
ctx.sendVideo calls, and do the same for all other messages types
3. no plugin is compatible with 2.0, so if you use plugins, you need to wait until they're migrated
4. fix all TypeScript errors (assumed to be straightforward)
5. a somewhat outdated and incomplete API reference can be found here:
https://jsr.io/@grammyjs/grammy/docThe goal is to gain experience with migrating from 1.0 to 2.0.
Please comment everything below that you find worth mentioning: what went well, what was annoying, what was surprising, etc. There must be a good migration guide in the docs when we release, and it needs to be based on this information. Also, we ideally want to provide an automated or semi-automated way of migrating any bot project to 2.0 and we need to hear about your experience in order to do this well.
PLUGIN MAINTAINERSPlease migrate all plugins you work on. Your current major version should be the last major version that is compatible with 1.x. Prepare a new major version that is compatible with 2.x (but do not release it yet).
1. Consider using the same tooling (deno tasks, directory structure, etc) as
the core library on the v2 branch. Before the release, we want to align the tooling of the entire ecosystem in order to share the npm mirroring logic. The more consistent plugins are, the easier this will be.
2. Please replace all
additive context flavors by
transformative context flavors in the spirit of
this issue.
3. Feel free to discuss anything that is not immediately obvious how to solve.
TRANSLATORSYou can expect many changes to the documentation in the coming time. Most pages will be partially or fully rewritten. The overall structure and tooling is not going to change meaningfully.
1. We created a
v1 branch that archives the current docs. They are still live at
grammy.dev until the release, and they will be available at
v1.grammy.dev for a long time. Automatic deployments still work, but you can mostly ignore this branch because the old docs are very unlikely to change.
2. We are going to update all the docs for 2.0 directly on the
main branch, so the existing translation workflow will keep working (business as usual). The changes no longer go live at
grammy.dev. Instead, this branch is live at
v2.grammy.dev.
3. After the 2.0 release, we will point the
grammy.dev alias from
v1.grammy.dev to
v2.grammy.dev and then all changes will go live immediately without adding another commit.