-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
config.js
44 lines (44 loc) · 2.57 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
const toBool = (x) => x == 'true'
const { existsSync } = require('fs')
const { Sequelize } = require('sequelize');
if (existsSync('config.env')) require('dotenv').config({ path: './config.env' })
process.env.NODE_OPTIONS = '--max_old_space_size=2560'//2.5
const DB_URL = process.env.DATABASE_URL || '';
module.exports = {
SESSION_ID: process.env.SESSION_ID || 'jsl~1147cm7lha889502fddbdd015872aae1dec0', //your ssid to run bot
HEROKU: {
API_KEY: process.env.HEROKU_API_KEY,
APP_NAME: process.env.HEROKU_APP_NAME },
BGM_URL : process.env.BGM_URL || "null",
REJECT_CALL : toBool(process.env.REJECT_CALL || 'false'),
BADWORD_BLOCK : toBool(process.env.BADWORD_BLOCK || 'false'),
ALLWAYS_ONLINE: toBool(process.env.ALLWAYS_ONLINE || "false"),
PM_BLOCK : toBool(process.env.PM_BLOCK || "false"),
BGMBOT : toBool(process.env.BGMBOT || "false"),
CALL_BLOCK : toBool(process.env.CALL_BLOCK || "false"),
STATUS_VIEW : process.env.STATUS_VIEW || "false",
SAVE_STATUS : toBool(process.env.SAVE_STATUS || "false"),
ADMIN_SUDO_ACCESS: toBool(process.env.ADMIN_SUDO_ACCESS || "false"),
DISABLE_PM: toBool(process.env.DISABLE_PM || "false"),
DISABLE_GRP : toBool(process.env.DISABLE_GRP || "false"),
ERROR_MSG : toBool(process.env.ERROR_MSG || "true"),
GPJOIN: toBool(process.env.GPJOIN || 'false'),
AUTO_READ : process.env.AUTO_READ || "false",//true, command
CHATBOT : process.env.CHATBOT || "false",//true, pm, group
AUTO_REACT : process.env.AUTO_REACT || "false",//true, command, emoji
WARNCOUND : process.env.WARNCOUND || 5,
BOT_INFO : process.env.BOT_INFO || "Abu MD;Jsl;https://i.imgur.com/o3WP9EK.jpeg",
MODE : process.env.MODE || "private",
PREFIX : process.env.PREFIX || "[.,!]",//both . and [.] equal, for multi prefix we use [] this
LANG : process.env.LANG || "en",
PM_MESSAGE: process.env.PM_MESSAGE || "null",
BOT_PRESENCE : process.env.BOT_PRESENCE || "unavailable",
AUDIO_DATA : process.env.AUDIO_DATA || "ABU MD;JSL;https://i.imgur.com/DyLAuEh.jpg",
STICKER_DATA : process.env.STICKER_DATA || "ᴀʙᴜ-ᴍᴅ;ᴊsʟ",
SUDO : process.env.SUDO || "918943027806",
RMBG_KEY: process.env.RMBG_KEY,
OPEN_AI: process.env.OPEN_AI,
ELEVENLABS: process.env.ELEVENLABS,
OCR_KEY: (process.env.OCR_KEY || 'K84003107488957').trim(),
DATABASE: DB_URL ? new Sequelize(DB_URL,{dialect:'postgres',ssl:true,protocol: 'postgres', dialectOptions: {native: true,ssl:{require: true,rejectUnauthorized: false}}, logging: false}) : new Sequelize({dialect:'sqlite',storage:'./database.db',logging:false})
};