Fix bot not working properly in groups

Change example a little bit
This commit is contained in:
Mahdi Dibaiee
2015-06-29 04:19:09 +04:30
parent 7174ad30b1
commit a8c4c0e33f
8 changed files with 59 additions and 73 deletions

View File

@ -111,6 +111,8 @@ var Message = (function (_Base) {
value: function send(bot) {
var _this = this;
console.log('sending message');
var messageId = undefined;
var reply_markup = JSON.stringify(this._keyboard.getProperties());
this.properties.reply_markup = reply_markup;

View File

@ -80,8 +80,7 @@ var Question = (function (_Message) {
var answers = this.answers;
return new Promise(function (resolve, reject) {
_get(Object.getPrototypeOf(Question.prototype), 'send', _this).call(_this, bot).then(function (update) {
var message = update.message;
_get(Object.getPrototypeOf(Question.prototype), 'send', _this).call(_this, bot).then(function (message) {
var answer = undefined;
answers.forEach(function find(a) {