Skip to content

Commit

Permalink
Add telegram validation
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Oct 15, 2023
1 parent 1c0fc0f commit d988097
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/global/utils/env.validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. \
Expand Down

0 comments on commit d988097

Please sign in to comment.