1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-24 22:46:41 +07:00

added fatal exception

This commit is contained in:
Fedor Katurov 2021-05-19 17:00:17 +07:00
parent 8e9a87d06d
commit a3fcb429ce
2 changed files with 2 additions and 3 deletions

View file

@ -28,7 +28,7 @@ async function main() {
logger.info("bot successfully started"); logger.info("bot successfully started");
} catch (e) { } catch (e) {
logger.error(e.message); logger.error(`FATAL EXCEPTION ${e.message}`);
} }
} }

View file

@ -49,8 +49,7 @@ export class TelegramService {
} }
logger.info(`telegram started webhook at ${this.webhook.url}`); logger.info(`telegram started webhook at ${this.webhook.url}`);
}) });
.catch(logger.warn);
} else { } else {
await this.bot.telegram.deleteWebhook().then( await this.bot.telegram.deleteWebhook().then(
() => this.bot.launch(), () => this.bot.launch(),