
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@towns-protocol/bot
Advanced tools
A bot framework for Towns.
We suggest users to quickstart a project using our cli.
$ bunx towns-bot init
If you prefer to install manually:
$ bun add @towns-protocol/bot viem hono
With Node:
import { makeTownsBot } from "@towns-protocol/bot";
import { serve } from "@hono/node-server";
const app = new Hono();
const bot = await makeTownsBot("<app-private-data-base64>", "<jwt-secret>");
bot.onMessage((handler, { channelId, isMentioned }) => {
if (isMentioned) {
handler.sendMessage(channelId, "Hello, world!");
}
});
const { jwtMiddleware, handler } = bot.start();
app.post("/webhook", jwtMiddleware, handler);
serve({ fetch: app.fetch });
With Bun:
import { makeTownsBot } from "@towns-protocol/bot";
const app = new Hono();
const bot = await makeTownsBot("<app-private-data-base64>", "<jwt-secret>");
bot.onMessage((handler, { channelId, isMentioned }) => {
if (isMentioned) {
handler.sendMessage(channelId, "Hello, world!");
}
});
const { jwtMiddleware, handler } = bot.start();
app.post("/webhook", jwtMiddleware, handler);
export default app;
Bot framework uses debug package for logging.
You can enable by setting the DEBUG environment variable to csb:bot.
DEBUG=csb:bot node dist/bot.cjs
FAQs
A bot framework for Towns.
The npm package @towns-protocol/bot receives a total of 919 weekly downloads. As such, @towns-protocol/bot popularity was classified as not popular.
We found that @towns-protocol/bot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.