UNPKG

umbot

Version:

Universal bot(vk, telegram, viber) or skills for Yandex.Alisa, Маруся and sber

47 lines (46 loc) 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TemplateTypeModel = void 0; class TemplateTypeModel { error; timeStart; controller; isUsedLocalStorage; sendInInit; constructor() { this.controller = undefined; this.error = null; this._initProcessingTime(); this.isUsedLocalStorage = false; this.sendInInit = null; this.timeStart = null; } async _initTTS() { if (this.controller.sound.sounds.length || this.controller.sound.isUsedStandardSound) { if (this.controller.tts === null) { this.controller.tts = this.controller.text; } this.controller.tts = await this.controller.sound.getSounds(this.controller.tts); } } _initProcessingTime() { this.timeStart = Date.now(); } getProcessingTime() { return Date.now() - this.timeStart; } getError() { return this.error; } getRatingContext() { return this.getContext(); } isLocalStorage() { return false; } getLocalStorage() { return Promise.resolve(null); } async setLocalStorage(data) { } } exports.TemplateTypeModel = TemplateTypeModel;