INNER CODE UNIT · TypeScript

cont

grammyjs/grammY · src/composer.ts:916

            const cont = () => ((nextCalled = true), Promise.resolve());
            try {
                await bound(ctx, cont);
            } catch (err) {
                nextCalled = false;
                await errorHandler(new BotError<C>(err, ctx), cont);
            }
            if (nextCalled) await next();
        });
        return composer;
    }
}

// === Filtered context middleware types
/**
 * Type of the middleware that can be passed to `bot.hears`.
 *
 * This helper type can be used to annotate middleware functions that are

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…