Socket
Socket
Sign inDemoInstall

node-vk-bot-api

Package Overview
Dependencies
3
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.10 to 2.4.11

10

lib/methods/sendMessage.js

@@ -6,7 +6,11 @@ const toArray = require('../utils/toArray');

if (Array.isArray(userId) && userId.length > 100) {
throw new Error('Message can\'t be sent to more than 100 recipients.');
}
this.execute(
'messages.send',
Object.assign(
userId < 2000000000
? { user_ids: toArray(userId).join(',') }
Array.isArray(userId)
? { user_ids: userId.join(',') }
: { peer_id: userId },

@@ -19,3 +23,3 @@ typeof args[0] === 'object'

sticker_id: sticker,
keyboard: keyboard ? keyboard.toJSON() : null,
keyboard: keyboard ? keyboard.toJSON() : undefined,
},

@@ -22,0 +26,0 @@ ),

{
"name": "node-vk-bot-api",
"version": "2.4.10",
"version": "2.4.11",
"description": "🤖 VK bot framework for Node.js, based on Bots Long Poll API and Callback API",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -149,2 +149,5 @@ [![node-vk-bot-api](https://img.shields.io/npm/v/node-vk-bot-api.svg?style=flat-square)](https://www.npmjs.com/package/node-vk-bot-api/)

// Multiple recipients
bot.sendMessage([145003487, 145003488], 'Hello!', 'photo1_1')
// Advanced usage

@@ -151,0 +154,0 @@ bot.sendMessage(145003487, {

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