Node PonyApi - Simple Node.js VK API Realization
Installation
npm i node-ponyapi
Usage
var PonyApi = var bot = 'Your Access Token' // Method that returns current user ID, first name and last namebotusers // Emits a "message" event when some message received.bot
Table of contents
API methods
You can use any available method from VK API. For example, this method returns users with IDs 1, 2, 3:
botusers
Look for another available methods here - https://vk.com/dev/methods
LongPool events
'message'
Message received.
bot
'chat_invite_user'
User entered chat.
bot
'chat_kick_user'
User leave chat.
bot
'chat_title_update'
Chat name changed
bot
'chat_photo_update'
Chat photo changed
bot
'chat_create'
Chat created
bot
Messaging
Object "msg" has two methods for send messages.
Reply method sends message with attaching original message:
bot
Send method just send message to peer of original message:
bot