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

botota

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botota

Module for developing VK.com bots

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

botota

Framefork for creating Bots in social network VK.com

Usage

const botota = require('botota')
const bot = new botota.Bot({
    token: "afbd70140d0b9cf4fa8ddbsbdf219k3b7073cc90cc89752baaa6aad5as0fa333se91c30b8an1k75ds7d2d", //example token
    v: '5.80', //version API, STRING type!
})


bot.on( (msg) => {
    msg.reply({
        text: 'Hello World!'
    })
})

bot.command('tick', (msg) => {
    msg.reply({
        text: 'tack'
    })
})

bot.event('group_join', (event) => {
    event.reply({
        text: 'Thank for subscribe!'
    })
}

API callings

.api

.api(method_name, params)
Usage
...
(async() =>{
   const messages = await bot.api('messages.getById', {
       message_ids: [1,2,3,4,5]
   }) 
})()

.execute

.execute(method_name, params)
Usage
...
(async() => {
   const chat = await bot.execute('messages.getChat', {
       chat_id: 42
   }) 
})()

Events

.event(event_name, callback)

Callback any Callback API event

.on(callback)

Callback any incoming message

.use(callback)

Callback any new message

.command(command, callback)

Callback any incoming message which starts with command

.mention(callback)

Callback any incoming message where the group is mentioned

.chat(callback)

Callback any incoming message from chats

.user(callback)

Callback any incoming message from users

Keywords

FAQs

Package last updated on 04 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