DOCUMENTATION IS HEREEEEE, YAAAY ✌️ ✌️
+ Small fixes
This commit is contained in:
@ -36,10 +36,6 @@ var DEFAULTS = {
|
||||
}
|
||||
};
|
||||
|
||||
process.on('uncaughtException', function (err) {
|
||||
console.error(err.stack);
|
||||
});
|
||||
|
||||
/**
|
||||
* Bot class used to connect to a new bot
|
||||
* Bots have an api property which gives access to all Telegram API methods,
|
||||
|
@ -78,20 +78,6 @@ var Forward = (function (_Base) {
|
||||
this.properties.message_id = _message;
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: 'keyboard',
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
value: function keyboard(kb) {
|
||||
this._keyboard = kb;
|
||||
return this;
|
||||
}
|
||||
|
||||
// This class inherits Base's send method
|
||||
|
||||
|
@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', {
|
||||
|
||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
||||
|
||||
var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
||||
var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||||
|
||||
@ -77,6 +77,20 @@ var Message = (function (_Base) {
|
||||
this.properties.reply_to_message_id = id;
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: 'preview',
|
||||
|
||||
/**
|
||||
* Set disable_web_page_preview of the message
|
||||
* @param {boolean} enable
|
||||
* @return {object} returns the message object
|
||||
*/
|
||||
value: function preview() {
|
||||
var enable = arguments[0] === undefined ? true : arguments[0];
|
||||
|
||||
this.properties.disable_web_page_preview = !enable;
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: 'keyboard',
|
||||
|
||||
|
@ -98,7 +98,7 @@ var Question = (function (_Message) {
|
||||
return message;
|
||||
} else {
|
||||
_this.emit('question:invalid', message);
|
||||
throw update;
|
||||
throw message;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user