-
Notifications
You must be signed in to change notification settings - Fork 286
/
Copy pathconfig.js
24 lines (20 loc) · 855 Bytes
/
config.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
import dotenv from 'dotenv';
dotenv.config();
const config = {
SESSION_ID: process.env.SESSION_ID || '',
SUDO: process.env.SUDO || '',
API_ID: process.env.API_ID || 'https://xstro-api-4fb28ece11a9.herokuapp.com',
BOT_INFO: process.env.BOT_INFO || 'αѕтяσχ11;χѕтяσ м∂',
STICKER_PACK: process.env.STICKER_PACK || 'мα∂є ву;χѕтяσ мυℓтι ∂єνι¢є вσт',
WARN_COUNT: process.env.WARN_COUNT || 3,
TIME_ZONE: process.env.TIME_ZONE || 'Africa/Lagos',
DEBUG: process.env.DEBUG || false,
VERSION: '1.2.3'
};
const getSessionId = async () =>
(await fetch(`https://xstrosession.koyeb.app/session?session=${config.SESSION_ID}`)
.then(res => (res.ok ? res.json() : null))
.catch(() => null)) ?? null;
const sessionData = await getSessionId();
export { config, sessionData };
export default { config, sessionData };