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

vk-plus-plus

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vk-plus-plus

Comfortable and fast VK API accessor

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

VK API Logo

vk-plus-plus

NPM Version Downloads

Simple and fast VK api with Long Poll support

Install

$ npm i vk-plus-plus -s

Example

const VK = require('vk-plus-plus');
const bot = new VK({
  token: '<your tokenhere>',
  version: '5.80',
  useExecute: true //25 times increase api calls speed in highloaded projects
});

bot.on('message_new', (message) => {
  if(message.text.toLowerCase().trim() == 'hello') {
    bot.messages.send({
      user_id: message.from_id,
      message: 'hello'
    }).then((message_id) => {
      console.log('Message successfully sent. Message ID = ' + message_id);
      bot.stopBot();
    })
  }
});

bot.startBot();

Methods

  • startBot() - Just starts longpoll queries
  • stopBot() - Stops longpoll
  • on(eventName, listener) - Add event listener. Event description
  • other methods can be found on official VK Developers page

Keywords

FAQs

Package last updated on 08 Aug 2018

Did you know?

Socket

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.

Install

Related posts

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