
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
Telegram bot framework
Please go through the Telegram Bot API first.
npm install bub --save
Try and keep your config in a separate JSON file, say bub.json. That way, you can share your code without sharing your API token.
{
"token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
"timeout": 3600
}
If your bot doesn't receive any messages for timeout number of seconds, it will stop checking for more. Default is 10 days.
var config = require("./bub.json");
var Bub = require("bub");
var bot = new Bub(config);
// User commands are handled with `on()`
bot.on("/start", function (result) {
// Quick responses are easy-peasy
result.respond("Hello, " + result.message.from.first_name);
});
bot.on("/longstory", function (result) {
// Plain old API methods
bot.sendChatAction({
chat_id: 123456789,
action: typing
}, function (body) {
console.log("Typing…");
});
});
// Anything without handlers goes here
bot.on("_default", console.log);
// Start checking for updates and handle them
bot.init();
respond() for quick responsesrespond() to send any kind of message based on the argument, e.g. URL to a png sends a photoFAQs
Telegram bot framework
The npm package bub receives a total of 33 weekly downloads. As such, bub popularity was classified as not popular.
We found that bub 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.