From d988097d5092505da30cffb7de6b34f28ead7480 Mon Sep 17 00:00:00 2001 From: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> Date: Sat, 14 Oct 2023 23:50:07 -0500 Subject: [PATCH] Add telegram validation --- src/global/utils/env.validate.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/global/utils/env.validate.ts b/src/global/utils/env.validate.ts index a5c8f0e0c..83b6a198a 100644 --- a/src/global/utils/env.validate.ts +++ b/src/global/utils/env.validate.ts @@ -6,6 +6,12 @@ export default function validateEnv( const F = f(__filename); // log.info(F, `You are in ${process.env.NODE_ENV?.toUpperCase()}`); + if (service === 'TELEGRAM' && !process.env.TELEGRAM_TOKEN) { + log.error(F, stripIndents`Missing TELEGRAM_TOKEN: You wont be able to login to Telegram. \ + You get this from messaging bot father.`); + return false; + } + if (service === 'DISCORD') { if (!process.env.DISCORD_CLIENT_ID) { log.error(F, stripIndents`Missing DISCORD_CLIENT_ID: You wont be able to login to discord. \