forked from franceking1/Flash-Md
-
Notifications
You must be signed in to change notification settings - Fork 0
/
set.js
62 lines (59 loc) · 2.53 KB
/
set.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
const fs = require('fs-extra');
const path = require("path");
const { Sequelize } = require('sequelize');
// Load environment variables if the .env file exists
if (fs.existsSync('set.env')) {
require('dotenv').config({ path: __dirname + '/set.env' });
}
const databasePath = path.join(__dirname, './database.db');
const DATABASE_URL = process.env.DATABASE_URL === undefined ? databasePath : process.env.DATABASE_URL;
module.exports = {
session: process.env.SESSION_ID || '',
PREFIXES: (process.env.PREFIX || '').split(',').map(prefix => prefix.trim()).filter(Boolean),
OWNER_NAME: process.env.OWNER_NAME || "Ringo Soccia",
OWNER_NUMBER: process.env.OWNER_NUMBER || "254795653413",
AUTO_READ_STATUS: process.env.AUTO_VIEW_STATUS || "on",
AUTOREAD_MESSAGES: process.env.AUTO_READ_MESSAGES || "on",
CHATBOT: process.env.CHAT_BOT || "on",
AUTO_DOWNLOAD_STATUS: process.env.AUTO_SAVE_STATUS || 'off',
A_REACT: process.env.AUTO_REACTION || 'on',
AUTO_BLOCK: process.env.BLOCK_ALL || 'on',
URL: process.env.BOT_MENU_LINKS || 'https://static.animecorner.me/2023/08/op2.jpg',
MODE: process.env.BOT_MODE || "private",
PM_PERMIT: process.env.PM_PERMIT || 'on',
HEROKU_APP_NAME: process.env.HEROKU_APP_NAME,
HEROKU_API_KEY: process.env.HEROKU_API_KEY,
WARN_COUNT: process.env.WARN_COUNT || '3',
PRESENCE: process.env.PRESENCE || 'online',
ADM: process.env.ANTI_DELETE || 'on',
TZ: process.env.TIME_ZONE || 'Africa/Nairobi',
DP: process.env.STARTING_MESSAGE || "on",
ANTICALL: process.env.ANTICALL || 'on',
DATABASE_URL,
DATABASE: DATABASE_URL === databasePath
? "postgresql://giftedtech_ke:9BzoUeUQO2owLEsMjz5Vhshva91bxF2X@dpg-crice468ii6s73f1nkt0-a.oregon-postgres.render.com/api_gifted_tech"
: "postgresql://giftedtech_ke:9BzoUeUQO2owLEsMjz5Vhshva91bxF2X@dpg-crice468ii6s73f1nkt0-a.oregon-postgres.render.com/api_gifted_tech",
/* 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,
}), */
};
// Watch for changes in this file and reload it automatically
const fichier = require.resolve(__filename);
fs.watchFile(fichier, () => {
fs.unwatchFile(fichier);
console.log(`Updated ${__filename}`);
delete require.cache[fichier];
require(fichier);
});