Socket
Socket
Sign inDemoInstall

rs-vk-bot

Package Overview
Dependencies
9
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rs-vk-bot

vk chat bot


Version published
Maintainers
1
Install size
574 kB
Created

Readme

Source

VK Chat Bot SDK

Getting started


// get secret token for your bot
// https://vk.com/dev/bots_docs?f=1.1.%20Acquiring%20The%20Access%20Token

const vkClient = new ChatBotClient("vk-secret-token");
vkClient.on("message_new", async (vkMessage: VkMessage) => {
    console.log("Message", vkMessage);

    vkClient.reply(vkMessage.user_id, {
        message: "My reply"
    });
});
vkClient.start();

VK keyboard

 const keyboard = new Keyboard([
        new ButtonsRow([
            new TextButton("Football", 'positive'),
            new TextButton("Basketball", 'negative'),
            new TextButton("Tennis", 'secondary')
        ]),
        new ButtonsRow([new LocationButton({some: "payload"})]),
    ]).oneTime();
    client.reply("1123441", {
        message: 'Select your sport',
        keyboard: keyboard
    });

Keywords

FAQs

Last updated on 30 Sep 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc