Comparing version 3.0.6 to 3.0.7
'use strict'; | ||
const EventEmitter = require('events'); | ||
const Middleware = require('./middleware'); | ||
const OutgoingMessage = require('./outgoing_message'); | ||
@@ -16,5 +15,6 @@ const get = require('lodash').get; | ||
* | ||
* @param {object} settings - settings to be passed onto the class extending BaseBot | ||
* @param {object} settings - inheritors of BaseBot take a settings | ||
* object as first param. | ||
*/ | ||
constructor(settings) { | ||
constructor() { | ||
super(); | ||
@@ -652,3 +652,3 @@ this.type = 'baseBot'; | ||
getUserInfo(userId) { | ||
if (!this.retrievableUserInfo) { | ||
if (!this.retrievesUserInfo) { | ||
return Promise.reject(TypeError( | ||
@@ -655,0 +655,0 @@ `Bots of type ${this.type} don't provide access to user info.`)); |
{ | ||
"name": "botmaster", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "Framework allowing developers to write bots that are agnostic with respect to the channel used by their users (messenger, telegram etc...)", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -44,2 +44,3 @@ 'use strict'; | ||
read: true, | ||
delivery: true, | ||
postback: true, | ||
@@ -66,3 +67,3 @@ quickReply: true, | ||
this.retrievableUserInfo = settings.retrievableUserInfo || false; | ||
this.retrievesUserInfo = settings.retrievesUserInfo || false; | ||
this.id = settings.id || 'mockId'; | ||
@@ -69,0 +70,0 @@ |
@@ -22,3 +22,3 @@ import test from 'ava'; | ||
const bot = new MockBot({ | ||
retrievableUserInfo: true, | ||
retrievesUserInfo: true, | ||
}); | ||
@@ -25,0 +25,0 @@ |
3806
275407