clevertype
Version:
An extensive Javascript/Typescript API wrapper for Cleverbot
25 lines • 800 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("util");
var User = /** @class */ (function () {
function User(id, cs, mood) {
this.mood = mood;
this.id = util_1.isString(id) ? id : id.toString();
this.history = [];
this.cs = cs;
this.messages = 0;
}
User.prototype.getFirst = function () {
if (!this.history.length)
return undefined;
return this.history[0].getConversation();
};
User.prototype.getLast = function () {
if (!this.history.length)
return undefined;
return this.history[this.history.length - 1].getConversation();
};
return User;
}());
exports.User = User;
//# sourceMappingURL=User.js.map