node-vk-bot
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -107,3 +107,3 @@ extendStatics(d, b); | ||
this.on('payload', function (msg, reply) { | ||
if (JSON.stringify(JSON.parse(msg.payload)) === JSON.stringify(JSON.parse(jsonString))) { | ||
if (JSON.stringify(JSON.parse(msg.payload)) === (jsonString)) { | ||
listener(msg, reply); | ||
@@ -110,0 +110,0 @@ } |
@@ -13,3 +13,3 @@ "use strict"; | ||
if (oneTime === void 0) { oneTime = false; } | ||
this.obj = { one_time: oneTime, buttons: [[]] }; | ||
this.obj = { one_time: oneTime, buttons: [] }; | ||
} | ||
@@ -19,2 +19,4 @@ Keyboard.prototype.addButton = function (label, color, payload) { | ||
if (payload === void 0) { payload = null; } | ||
if (!this.obj.buttons.length) | ||
this.obj.buttons.push([]); | ||
var lastRow = this.obj.buttons[this.obj.buttons.length - 1]; | ||
@@ -21,0 +23,0 @@ if (lastRow.length === 4) |
{ | ||
"name": "node-vk-bot", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Create and control VK bots easily.", | ||
@@ -36,3 +36,3 @@ "main": "./build/index.js", | ||
"tslint": "5.11.0", | ||
"typescript": "3.1.6", | ||
"typescript": "3.2.1", | ||
"@types/glob": "7.1.1" | ||
@@ -39,0 +39,0 @@ }, |
@@ -117,3 +117,3 @@ import { EventEmitter } from 'events' | ||
this.on('payload', (msg, reply) => { | ||
if (JSON.stringify(JSON.parse(msg.payload)) === JSON.stringify(JSON.parse(jsonString))) { | ||
if (JSON.stringify(JSON.parse(msg.payload)) === (jsonString)) { | ||
listener(msg, reply) | ||
@@ -222,2 +222,2 @@ } | ||
export * from './decorators' | ||
export * from './decorators' |
@@ -14,5 +14,7 @@ export enum KeyboardColor { | ||
constructor(oneTime = false) { this.obj = { one_time: oneTime, buttons: [[]] } } | ||
constructor(oneTime = false) { this.obj = { one_time: oneTime, buttons: [] } } | ||
addButton(label: string, color: string = KeyboardColor.DEFAULT, payload = null) { | ||
if (!this.obj.buttons.length) this.obj.buttons.push([]) | ||
let lastRow = this.obj.buttons[this.obj.buttons.length - 1] | ||
@@ -19,0 +21,0 @@ if (lastRow.length === 4) throw new Error('Maximum amount of buttons in one row = 4') |
@@ -21,4 +21,5 @@ { | ||
"./node_modules", | ||
"./test" | ||
"./test", | ||
"./build" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
66000
1356