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

node-vk-bot-api

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.3.1 to 0.3.2

22

index.js
const request = require('request');
const api = require('./method');
const group = {};
const action = {};
var execute = [];
var longPollParams = {};
var group = {};
var action = {};

@@ -10,4 +12,2 @@ action.commands = {};

let execute = [];
setInterval(() => {

@@ -121,3 +121,5 @@ if (execute.length) {

} else {
this.getLongPoll(body.response);
longPollParams = body.response;
this.getLongPoll();
}

@@ -127,3 +129,3 @@ });

},
getLongPoll: function(longPollParams) {
getLongPoll: function() {
request({

@@ -153,3 +155,3 @@ url: `https://${longPollParams.server}`,

if (!updates || updates.length == 0) {
this.getLongPoll(longPollParams);
this.getLongPoll();
return;

@@ -176,3 +178,5 @@ }

this.replyMessage(update);
}).catch(() => {
}).catch(err => {
console.log(err);
this.sendMessage(uid, group.mode.msg);

@@ -185,3 +189,3 @@ });

this.getLongPoll(longPollParams);
this.getLongPoll();
}

@@ -188,0 +192,0 @@ });

{
"name": "node-vk-bot-api",
"version": "0.3.1",
"version": "0.3.2",
"description": "Clean API for VK bots based on long poll with multi-dispatch send messages (~75 per second).",

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

@@ -55,3 +55,3 @@ [![node-vk-bot-api](https://img.shields.io/npm/v/node-vk-bot-api.svg)](https://www.npmjs.com/package/node-vk-bot-api/)

* [.startLongPoll()](#startlongpoll)
* [.getLongPoll(longPollParams)](#getlongpolllongpollparams)
* [.getLongPoll()](#getlongpoll)

@@ -204,8 +204,4 @@ ### .auth(token, opts)

### .getLongPoll(longPollParams)
### .getLongPoll()
| Parameter | Type | Requried |
| ----------------|:---------:| ---------:|
| longPollParams | object | yes |
Start long poll.

@@ -212,0 +208,0 @@

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