1.0.6-rc-1 • Published 4 years ago

vk-io-longpoll v1.0.6-rc-1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

vk-io-longpoll

Description/Описание

EN VK LongPoll is a module created to automatically configure LongPoll in the Vkontakte group. RU VK LongPoll - Это модуль, созданный для автоматической настройки LongPoll в группе Вконтакте.

Installation/Установка

npm i vk-io-longpoll

Документация

Examples of using in place with VK-IO

const { VK, Keyboard } = require('vk-io')
const { LongPoll } = require('vk-io-longpoll');
const vk = new VK({
   token: process.env.TOKEN
   apiMode: 'sequential',
   pollingGroupId: 123456789
})
const pool = new LongPoll({
   token: process.env.TOKEN
   group_id: 123456789
})
const { updates } = vk;

updates.start()
  .then(() => {
      console.log('Bot Started')
   })
    .catch((e) => {
         if(e.toString(/(№100)/ig, 'LongPoll')) {
              console.log('Configure LongPoll : )');
                pool.longpoll();
              return;
          }
          console.error('Error: \n'+ error)
      })  
   ...
1.0.6-rc-1

4 years ago

1.0.6-rc

4 years ago

1.0.5-rc

4 years ago

1.0.4-rc

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago