Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nk-ntba

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nk-ntba - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

2

package.json
{
"name": "nk-ntba",
"version": "2.1.3",
"version": "2.1.4",
"description": "Telegram bot api library for NodeJS. Developer's telegram: @NekitKuzmenko",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -118,1 +118,32 @@ Bot authorization:

You can check available methods in source code of this library.
Example of echo bot:
```
const Bot = require('nk-ntba');
let bot = new Bot('API token of your bot');
bot.setCallback('message.text', async (msg) => {
let cid = msg.chat.id;
let msgid = msg.message_id;
let tx = msg.text;
let r = await bot.sendMessage(cid, `You sent: ${tx}`);
setTimeout(() => {
bot.deleteMessage(cid, msgid);
bot.deleteMessage(cid, r.message_id);
bot.sendMessage(cid, `Messages were deleted after 5 sec`);
}, 5000);
});
bot.listen({
long_polling: 300
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc