forked from Keithkeizzah/ALPHA-MD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset.js
More file actions
67 lines (59 loc) · 2.27 KB
/
set.js
File metadata and controls
67 lines (59 loc) · 2.27 KB
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
63
64
65
66
67
const fs = require('fs-extra');
const { Sequelize } = require('sequelize');
const path = require('path');
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;
const config = {
session: process.env.SESSION_ID || 'keith',
PREFIXE: process.env.PREFIX || "",
OWNER_NAME: process.env.OWNER_NAME || "Keith",
NUMERO_OWNER: process.env.NUMERO_OWNER || "254743995989",
AUTO_DOWNLOAD_STATUS: process.env.AUTO_DOWNLOAD_STATUS || 'non',
URL: process.env.URL || "https://files.catbox.moe/6hd2t7.jpg",
AUTO_BLOCK: process.env.AUTO_BLOCK || 'no',
GCF: process.env.GROUP_CONTROL || 'no',
AUTO_STATUS_MSG: process.env.AUTO_STATUS_MSG || 'viewed by alpha',
AUTO_STATUS_REPLY: process.env.AUTO_STATUS_REPLY || 'no',
ANTICALL_MSG: process.env.ANTICALL_MSG || 'call declined',
GURL: process.env.GURL || "https://whatsapp.com/channel/0029Vaan9TF9Bb62l8wpoD47",
EVENTS: process.env.EVENTS || "yes",
BOT: process.env.BOT_NAME || 'ALPHA_MD',
MODE: process.env.PUBLIC_MODE || "no",
TIMEZONE: process.env.TIMEZONE || "Africa/Nairobi",
PM_PERMIT: process.env.PM_PERMIT || 'no',
DP: process.env.STARTING_BOT_MESSAGE || "yes",
ADM: process.env.ANTI_DELETE_MESSAGE || 'no',
DATABASE_URL,
DATABASE: DATABASE_URL === databasePath
? 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);
});
module.exports = config;