node-vk-bot-api
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -8,3 +8,3 @@ class Context { | ||
reply(...args) { | ||
this.bot.sendMessage(this.message.peer_id, ...args) | ||
this.bot.sendMessage(this.message.peer_id || this.message.user_id, ...args) | ||
} | ||
@@ -11,0 +11,0 @@ } |
module.exports = function (ctx, idx = -1) { | ||
if (this.middlewares.length > idx + 1) { | ||
const { fn, triggers } = this.middlewares[idx + 1] | ||
const message = ctx.message.text.toLowerCase() | ||
const isTriggered = (triggers || []).some( | ||
(trigger) => { | ||
if (ctx.message.type === 'message_new' && trigger !== 'message_new') { | ||
const message = ctx.message.text ? ctx.message.text.toLowerCase() : '' | ||
if (trigger instanceof RegExp) { | ||
@@ -9,0 +10,0 @@ return trigger.test(message) |
{ | ||
"name": "node-vk-bot-api", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "🤖 Vk bot framework for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18743