File size: 526 Bytes
0f6a596
 
 
 
 
 
 
6b55fd1
7660a71
0f6a596
7660a71
 
 
 
 
 
 
343fb82
 
 
0f6a596
 
 
6b55fd1
1f02ed6
 
0f6a596
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import dotenv from 'dotenv';

dotenv.config();

const dbUri = process.env.DB_URI;
const HUGGING_TOKEN = process.env.HUGGING_TOKEN;
const GoogleAPIKey = process.env.GOOGLE_API_KEY;
const BotToken = process.env.BOT_TOKEN;
const IsTelegramBot = false;

if (IsTelegramBot) {
  if(!BotToken) {
    throw new Error("Required `BOT_TOKEN` ");
  }
}

if (!dbUri && !HUGGING_TOKEN && !GoogleAPIKey) {
    throw new Error("Missing variables required");
}

export {
  dbUri,
  HUGGING_TOKEN,
  GoogleAPIKey,
  BotToken,
  IsTelegramBot
};