-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.js
More file actions
53 lines (44 loc) · 1.58 KB
/
config.js
File metadata and controls
53 lines (44 loc) · 1.58 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
import { watchFile, unwatchFile } from 'fs';
import { fileURLToPath } from 'url';
import log from '#lib/logger.js';
global.ownerNumber = Object.freeze([
'62882005514880',
'62882003353414'
]);
global.pubelik = true;
global.stickpack = 'Created By';
global.stickauth = 'EternityBot';
global.copyright = '© 2025 - VryptLabs';
global.title = 'EternityBot';
global.body = 'A lightweight and efficient WhatsApp bot built with Node.js and Baileys.';
global.source = 'https://github.com/VryptLab/EternityBot';
global.newsletter = '120363404886887749@newsletter';
const BASE_URL = 'https://raw.githubusercontent.com/VryptLab/.github/refs/heads/main/';
global.thumbnail = `${BASE_URL}banner.png`;
global.logo = `${BASE_URL}new-logo.png`;
global.icon = global.logo;
global.mess = Object.freeze({
gagal: 'Gagal, harap lapor owner!',
wait: 'Harap tunggu sebentar...',
owner: 'Fitur ini hanya bisa digunakan oleh Owner.',
group: 'Fitur ini hanya bisa digunakan dalam Group.',
admin: 'Fitur ini hanya bisa digunakan oleh Admin Group.',
botAdmin: 'Bot harus menjadi Admin terlebih dahulu.',
private: 'Fitur ini hanya bisa digunakan di chat pribadi.'
});
const file = fileURLToPath(import.meta.url);
let isReloading = false;
watchFile(file, async () => {
if (isReloading) return;
isReloading = true;
unwatchFile(file);
log.info('Reloading config file...');
try {
await import(`${file}?update=${Date.now()}`);
log.success('Config reloaded successfully');
} catch (error) {
log.error(`Failed to reload config: ${error.message}`);
} finally {
isReloading = false;
}
});