1.0.5 • Published 7 years ago

vk-plus-plus v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago