forked from franceking1/Flash-Md
-
Notifications
You must be signed in to change notification settings - Fork 0
/
set.js
56 lines (55 loc) · 5.01 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
const fs = require('fs-extra');
const { Sequelize } = require('sequelize');
if (fs.existsSync('set.env'))
require('dotenv').config({ path: __dirname + '/set.env' });
const path = require("path");
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 || 'FLASH-MD-WA-BOT;;;=>eyJub2lzZUtleSI6eyJwcml2YXRlIjp7InR5cGUiOiJCdWZmZXIiLCJkYXRhIjoiWUVIeHNhV0crcnh5SXk1cEduRTVYd0ZOK0hkKzlWUWZnMGJod3JSOEZHcz0ifSwicHVibGljIjp7InR5cGUiOiJCdWZmZXIiLCJkYXRhIjoiSDZuREZIZnVzWkJUZG4xVnVZTkRKa1UxRmhycERKeFp2b3pGZDU4Z1UyOD0ifX0sInBhaXJpbmdFcGhlbWVyYWxLZXlQYWlyIjp7InByaXZhdGUiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiJVSFZOL2o2SWczZHZ1b1dCNG9XUE9oSU1nZS9tSWRHWllab3JjVzZrbUU4PSJ9LCJwdWJsaWMiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiJIZkdpVkNxQ3oxNmF4bndMdEhzaEkwMVphd2s3aW1DYXZ2UnN1KzlsS3djPSJ9fSwic2lnbmVkSWRlbnRpdHlLZXkiOnsicHJpdmF0ZSI6eyJ0eXBlIjoiQnVmZmVyIiwiZGF0YSI6Ik1ETzdMNkwxa255MDVrdUl3dmE1NTFuYzlNRDBIMExTOGIzUDc4RjBxa1k9In0sInB1YmxpYyI6eyJ0eXBlIjoiQnVmZmVyIiwiZGF0YSI6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ER_NUMBER : process.env.OWNER_NUMBER || "2348146605906",
AUTO_READ_STATUS: process.env.AUTO_VIEW_STATUS || "on",
AUTOREAD_MESSAGES: process.env.AUTO_READ_MESSAGES || "off",
CHATBOT: process.env.CHAT_BOT || "off",
AUTO_DOWNLOAD_STATUS: process.env.AUTO_SAVE_STATUS || 'off',
BOT : process.env.BOT_NAME || 'FLASH-MD',
//OPENAI_API_KEY : process.env.OPENAI_API_KEY || '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',
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 || 'off',
HEROKU_APP_NAME : process.env.HEROKU_APP_NAME,
HEROKU_APY_KEY : process.env.HEROKU_API_KEY ,
WARN_COUNT : process.env.WARN_COUNT || '3' ,
PRESENCE : process.env.PRESENCE || 'available',
//GPT : process.env.OPENAI_API_KEY || '',
DP : process.env.STARTING_MESSAGE || "on",
ADM : process.env.ANTI_DELETE_MESSAGE || 'off',
DATABASE_URL,
DATABASE: DATABASE_URL === databasePath
? "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" : "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9",
/* 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,
}),*/
};
let fichier = require.resolve(__filename);
fs.watchFile(fichier, () => {
fs.unwatchFile(fichier);
console.log(`mise à jour ${__filename}`);
delete require.cache[fichier];
require(fichier);
});