Socket
Socket
Sign inDemoInstall

node-telegram-bot-api

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-telegram-bot-api - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

2

package.json
{
"name": "node-telegram-bot-api",
"version": "0.3.0",
"version": "0.4.0",
"description": "Telegram Bot API",

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

@@ -80,3 +80,4 @@ var EventEmitter = require('events').EventEmitter;

var self = this;
if (req.url === '/bot' && req.method === 'POST') {
var url = '/bot'+this.token;
if (req.url === url && req.method === 'POST') {
var fullBody = '';

@@ -89,7 +90,8 @@ req.on('data', function (chunk) {

var data = JSON.parse(fullBody);
self.emit('message', data);
self.offset = data.update_id;
self.emit('message', data.message);
} catch (error) {
console.error(error);
}
res.end('OK\n');
res.end('OK :P\n');
});

@@ -96,0 +98,0 @@ } else {

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