-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
config.js
83 lines (70 loc) · 2.24 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const fs = require('fs');
const dotenv = require('dotenv');
const { Sequelize } = require('sequelize');
if (fs.existsSync('config.env')) {
dotenv.config({
path: './config.env'
});
}
const LOGS = process.env.LOGS || "false";
const API = "https://api-aswin-sparky.koyeb.app";
const ALIVE = process.env.ALIVE || "I am Alive";
const HANDLERS = process.env.HANDLERS || ".";
const SESSION_ID = process.env.SESSION_ID || "";
const SUDO = process.env.SUDO || '917012984396';
const AUTO_STATUS_VIEW = process.env.AUTO_STATUS_VIEW || "true";
const ALWAYS_ONLINE = process.env.ALWAYS_ONLINE || "false";
const DISABLE_PM = process.env.DISABLE_PM || "false";
const PM_BLOCK = process.env.PM_BLOCK || "false";
const PMB = process.env.PMB || "Sorry, I can't help you in private chat.";
const READ_MESSAGES = process.env.READ_MESSAGES || "false";
const BOT_INFO = process.env.BOT_INFO || "X-BOT-MD;ASWIN SPARKY;https://i.imgur.com/r3GZeiX.jpeg";
const URL = process.env.URL || "https://www.instagram.com/sparky.drip";
const AUDIO_DATA = process.env.AUDIO_DATA || "X BOT MD;ASWIN SPARKY;https://i.imgur.com/fVCRCYG.jpeg";
const STICKER_DATA = process.env.STICKER_DATA || "X BOT MD;ASWIN SPARKY";
const WORK_TYPE = process.env.WORK_TYPE || 'public';
const DATABASE_URL = process.env.DATABASE_URL || "./lib/database.db";
const HEROKU_APP_NAME = process.env.HEROKU_APP_NAME || "";
const HEROKU_API_KEY = process.env.HEROKU_API_KEY || "";
const KOYEB_API_KEY = process.env.KOYEB_API_KEY || "";
module.exports = {
API,
ALIVE,
LOGS,
HANDLERS,
SUDO,
WORK_TYPE,
SESSION_ID,
STICKER_DATA,
BOT_INFO,
AUDIO_DATA,
AUTO_STATUS_VIEW,
ALWAYS_ONLINE,
PM_BLOCK,
PMB,
READ_MESSAGES,
DISABLE_PM,
URL,
VERSION:"3.2.0",
HEROKU_API_KEY,
HEROKU_APP_NAME,
KOYEB_API_KEY,
DATABASE_URL: DATABASE_URL,
DATABASE:
DATABASE_URL === "./lib/database.db"
? new Sequelize({
dialect: "sqlite",
storage: DATABASE_URL,
logging: false,
})
: new Sequelize(DATABASE_URL, {
dialect: "postgres",
ssl: true,
protocol: "postgres",
dialectOptions: {
native: true,
ssl: { require: true, rejectUnauthorized: false },
},
logging: false,
}),
};