
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@grammyjs/runner
Advanced tools
While the core of grammY is extremely efficient, the package does not ship with a built-in mechanism for long polling at scale. (It does scale well with webhooks, though.)
The grammY runner solves this by providing you with a sophisticated mechanism that can pull updates concurrently from the Telegram servers, and in turn execute your bot's middleware stack concurrently, all while catching errors, timeouts, and giving you full control over how much load is applied to your server.
Use the grammY runner package if
Do not use grammY runner if
Here is a quickstart for you, but the real documentation is here on the website. The runner package has many more features, and they are documented there.
npm i @grammyjs/runner
Import run
from @grammyjs/runner
, and replace bot.start()
with run(bot)
. It is that simple. Done!
Okay okay, here is some example code:
import { Bot } from "grammy";
import { run } from "@grammyjs/runner";
// Create bot
const bot = new Bot("<token>");
// Add the usual middleware, yada yada
bot.on("message", (ctx) => ctx.reply("Got your message."));
// Run it concurrently!
run(bot);
grammY runner makes it trivial to have very high update throughput. However, concurrency is generally very hard to get right, so please read this section in the docs.
—more verbose documentation about concurrency in grammY.
—documentation of everything that grammY runner exports.
—repository full of example bots, look our for those that demonstrate how to use grammY runner.
FAQs
Scale grammY bots that use long polling
The npm package @grammyjs/runner receives a total of 3,011 weekly downloads. As such, @grammyjs/runner popularity was classified as popular.
We found that @grammyjs/runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.