-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathconfig.js
35 lines (26 loc) · 1.08 KB
/
config.js
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
28
29
30
31
32
33
34
35
import 'dotenv/config'
// Check if bot token is there or not
if(!process.env.BOT_TOKEN) {
console.log("Please set the BOT_TOKEN environment variable.");
process.exit(1);
}
// Check if bot token is there or not
if(!process.env.DB_URL) {
console.log("Please set the DB_URL environment variable.");
process.exit(1);
}
/** List of amdins (tg IDs) separated by space */
const ADMINS = process.env.ADMINS ?? ''
/** Telegram bot token */
const BOT_TOKEN = process.env.BOT_TOKEN ?? ''
/** HTTPS Proxy URL */
const HTTPS_PROXY = process.env.PROXY ?? ''
/** MongoDB URL */
const DB_URL = process.env.DB_URL ?? ''
/** Cloudflare Worker URL */
const WORKER_URL = process.env.WORKER_URL ?? ''
/** API Key - A random secure key to access api */
const API_KEY = process.env.API_KEY ?? '' // Generate any API Key and pass it when accessing the API.
/** Maximum number of products can be added by a user at a time. */
const LIMIT = Number(process.env.LIMIT) // Maximum number of products can be added by a user at a time.
export { ADMINS, BOT_TOKEN, DB_URL, WORKER_URL, API_KEY, LIMIT, HTTPS_PROXY }