forked from Cod3Uchiha/TKM-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
set.js
56 lines (56 loc) · 5.42 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 || 'eyJub2lzZUtleSI6eyJwcml2YXRlIjp7InR5cGUiOiJCdWZmZXIiLCJkYXRhIjoiQ09KWUF2TjNMNlAvNGhkMS9ycHFOUWhEeFpUWTZtTTF3a2J6UXlHUDAwUT0ifSwicHVibGljIjp7InR5cGUiOiJCdWZmZXIiLCJkYXRhIjoicDhlTThwdDVZUkpaL1Y1NG1rblYxb2o1akpnb296VkZQcFNnWklwZkh6WT0ifX0sInBhaXJpbmdFcGhlbWVyYWxLZXlQYWlyIjp7InByaXZhdGUiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiJHTDM3aE9IU1pUaEtDMzZZN3djZHZLRlZ5YXVaWld0RUdIQlc1dWI1VEVZPSJ9LCJwdWJsaWMiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiI4VHdKWERXdzZTZGpEbk5PTnQ4T3BpRlBCaFpyWmZBQUprYkl6dzF3Y0NjPSJ9fSwic2lnbmVkSWRlbnRpdHlLZXkiOnsicHJpdmF0ZSI6eyJ0eXBlIjoiQnVmZmVyIiwiZGF0YSI6ImtCREt2TDVJSHVDY0l5TFlBZ1RMKzQ5dy9acTZNMHpDMjFYUVBKVDZuM2c9In0sInB1YmxpYyI6eyJ0eXBlIjoiQnVmZmVyIiwiZGF0YSI6Ik84OTlGdElia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JuYW1lIjoiMjU0NzI4ODQyNjg4OjNAcy53aGF0c2FwcC5uZXQiLCJkZXZpY2VJZCI6MH0sImlkZW50aWZpZXJLZXkiOnsidHlwZSI6IkJ1ZmZlciIsImRhdGEiOiJCYzIzcWpPSnJYNm9iTDZzREZRWlJrQjQwNWVJTW5WU2J3eUVMUElzZzZzNSJ9fV0sInBsYXRmb3JtIjoiYW5kcm9pZCIsImxhc3RBY2NvdW50U3luY1RpbWVzdGFtcCI6MTcyMTA1NjY5OSwibXlBcHBTdGF0ZUtleUlkIjoiQUFBQUFPMFgifQ==',
PREFIXE: process.env.PREFIX || ".",
OWNER_NAME: process.env.OWNER_NAME || "Cod3Uchiha",
NUMERO_OWNER : process.env.OWNER_NUM || "254728842688",
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
? "postgresql://tkm:Aqi6tqwyv5IwDHncTtVi5XtMGZvfndDJ@dpg-cqahogtds78s739sl81g-a.oregon-postgres.render.com/takudzwa" : "postgresql://tkm:Aqi6tqwyv5IwDHncTtVi5XtMGZvfndDJ@dpg-cqahogtds78s739sl81g-a.oregon-postgres.render.com/takudzwa",
/* 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);
});