feature: add event listeners to get answers from Base.send method only when explicitly asked #47

Merged
laurynas-karvelis merged 3 commits from feature/prevent-event-listener-overflow into master 2018-12-24 12:00:50 +00:00
Showing only changes of commit 45a7251917 - Show all commits

View File

@ -44,9 +44,8 @@ export default class Question extends Message {
*/ */
send(bot) { send(bot) {
const answers = this._answers; const answers = this._answers;
const expectAnswer = true;
return super.send(bot, expectAnswer).then(message => { return super.send(bot).then(message => {
let answer; let answer;
answers.forEach(function find(a) { answers.forEach(function find(a) {