DOCUMENTATION IS HEREEEEE, YAAAY ✌️ ✌️

+ Small fixes
This commit is contained in:
Mahdi Dibaiee
2015-07-03 19:37:40 +04:30
parent da12078d73
commit 086614f1e7
9 changed files with 29 additions and 120 deletions

View File

@ -46,17 +46,5 @@ export default class Forward extends Base {
return this;
}
/**
* Sets keyboard of the message
* The value of reply_markup is set to the sanitized keyboard properties
* i.e. reply_markup = JSON.stringify(kb.getProperties())
* @param {object} kb A Keyboard instance
* @return {object} returns the message object
*/
keyboard(kb) {
this._keyboard = kb;
return this;
}
// This class inherits Base's send method
}

View File

@ -45,6 +45,16 @@ export default class Message extends Base {
return this;
}
/**
* Set disable_web_page_preview of the message
* @param {boolean} enable
* @return {object} returns the message object
*/
preview(enable = true) {
this.properties.disable_web_page_preview = !enable;
return this;
}
/**
* Sets keyboard of the message
* The value of reply_markup is set to the sanitized keyboard properties

View File

@ -62,7 +62,7 @@ export default class Question extends Message {
return message;
} else {
this.emit('question:invalid', message);
throw update;
throw message;
}
});
}