INNER CODE UNIT · TypeScript
run
grammyjs/grammY · src/composer.ts:167
export async function run<C extends Context>(
middleware: MiddlewareFn<C>,
ctx: C,
) {
await middleware(ctx, leaf);
}
// === Composer
/**
* The composer is the heart of the middleware system in grammY. It is also the
* superclass of `Bot`. Whenever you call `use` or `on` or some of the other
* methods on your bot, you are in fact using the underlying composer instance
* to register your middleware.
*
* If you're just getting started, you do not need to worry about what
* middleware is, or about how to use a composer.
*
* On the other hand, if you want to dig deeper into how grammY implements