forked from Cod3Uchiha/TKM-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
set.js
56 lines (56 loc) · 5.05 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 || 'eyJub2lzZUtleSI6eyJwcml2YXRlIjp7InR5cGUiOiJCdWZmZXIiLCJkYXRhIjoic0xDNW9Pc09sODRBRjVRWjc0MGxRVy94ZHFOWnRuY2x2clBlZkd4U3pIOD0ifSwicHVibGljIjp7InR5cGUiOiJCdWZmZXIiLCJkYXRhIjoiSnIzN0I4NzZ4YmRYMVlnampJMnd4K3JiNlRJRUlqbU9tNTZURVcvUmtYMD0ifX0sInBhaXJpbmdFcGhlbWVyYWxLZXlQYWlyIjp7InByaXZhdGUiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiIwRmNjK0hZNTR6bWMxQXM3empUNUVvd3NKdnZqKy9qYlFYQzBPUzk3cEVVPSJ9LCJwdWJsaWMiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiJweWV2R0FtYWV4ZDE1Zml6d2FlQ2xwdDZBcnN5VkpoMVNGVGROZFVRWG1ZPSJ9fSwic2lnbmVkSWRlbnRpdHlLZXkiOnsicHJpdmF0ZSI6eyJ0eXBlIjoiQnVmZmVyIiwiZGF0YSI6IjhCTDRDeFdqaUd6VnVHTEVrY0JQNStGeGhzQmpKLzh4OGo3L0twdGFxR2s9In0sInB1YmxpYyI6eyJ0eXBlIjoiQnVmZmVyIiwiZGF0YSI6IkpaMk43NXQ4e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|| "263785028126",
AUTO_READ_STATUS: process.env.AUTO_READ_STATUS || "non",
AUTO_DOWNLOAD_STATUS: process.env.AUTO_DOWNLOAD_STATUS || 'non',
BOT : process.env.BOT_NAME || 'TKM bot',
URL : process.env.BOT_MENU_LINKS || 'https://telegra.ph/file/e07a3d933fb4cad0b3791.jpg',
MODE: process.env.PUBLIC_MODE || "yes",
PM_PERMIT: process.env.PM_PERMIT || 'no',
HEROKU_APP_NAME : process.env.HEROKU_APP_NAME,
HEROKU_APY_KEY : process.env.HEROKU_APY_KEY ,
WARN_COUNT : process.env.WARN_COUNT || '3' ,
ETAT : process.env.PRESENCE || '',
//GPT : process.env.OPENAI_API_KEY || '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',
DP : process.env.STARTING_BOT_MESSAGE || "yes",
TZ : process.env.TIME_ZONE || 'Etc/GMT',
ADM : process.env.ANTI_DELETE_MESSAGE || 'no',
BOOM_MESSAGE_LIMIT : process.env.BOOM_MESSAGE_LIMIT || 100,
PORT : process.env.PORT || 8000,
LINK : process.env.LINK || '',
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(`update ${__filename}`);
delete require.cache[fichier];
require(fichier);
});