node-nlp
Version:
Library for NLU (Natural Language Understanding) done in Node.js
27 lines (26 loc) • 812 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var Keyboard = (function () {
function Keyboard(session) {
this.session = session;
this.data = {
contentType: 'application/vnd.microsoft.keyboard',
content: {}
};
}
Keyboard.prototype.buttons = function (list) {
this.data.content.buttons = [];
if (list) {
for (var i = 0; i < list.length; i++) {
var action = list[i];
this.data.content.buttons.push(action.toAction ? action.toAction() : action);
}
}
return this;
};
Keyboard.prototype.toAttachment = function () {
return this.data;
};
return Keyboard;
}());
exports.Keyboard = Keyboard;
;