-
Notifications
You must be signed in to change notification settings - Fork 31
/
index.js
40 lines (34 loc) · 922 Bytes
/
index.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
// Modul dan dependensi yang diperlukan
require("./config.js");
const handler = require("./handler.js");
const pkg = require("./package.json");
const tools = require("./tools/exports.js");
const CFonts = require("cfonts");
const SimplDB = require("simpl.db");
// Buat basis data
const db = new SimplDB();
// Atur konfigurasi ke global
global.handler = handler;
global.config.pkg = pkg;
global.tools = tools;
global.db = db;
// Memulai
console.log(`[${pkg.name}] Stating...`);
// Tampilkan judul menggunakan CFonts
CFonts.say(pkg.name, {
font: "chrome",
align: "center",
gradient: ["red", "magenta"]
});
// Menampilkan informasi paket
const authorName = pkg.author.name || pkg.author;
CFonts.say(
`'${pkg.description}'\n` +
`By ${authorName}`, {
font: "console",
align: "center",
gradient: ["red", "magenta"]
}
);
// Impor dan jalankan modul utama
require("./main.js");