dibosockets 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ exports.makeMessagesSocket = void 0;
|
|
|
7
7
|
const boom_1 = require("@hapi/boom");
|
|
8
8
|
const node_cache_1 = __importDefault(require("@cacheable/node-cache"));
|
|
9
9
|
const crypto_1 = require("crypto");
|
|
10
|
-
const RexxHayanasi = require('./
|
|
10
|
+
const RexxHayanasi = require('./Rhandler');
|
|
11
11
|
const WAProto_1 = require("../../WAProto");
|
|
12
12
|
const Defaults_1 = require("../Defaults");
|
|
13
13
|
const Utils_1 = require("../Utils");
|
package/lib/index.js
CHANGED
|
@@ -2,37 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
const chalk = require("chalk");
|
|
4
4
|
const gradient = require("gradient-string");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
name
|
|
10
|
-
} = require(path.join(process.cwd(), "package.json"));
|
|
5
|
+
const os = require('os');
|
|
6
|
+
// Dummy data (sesuaikan dengan variabel global kamu)
|
|
7
|
+
const name = "Dibo-Baileys";
|
|
8
|
+
const version = "1.0.8";
|
|
11
9
|
|
|
12
10
|
function fancyLog() {
|
|
13
11
|
const title = name || "Dibo-Baileys";
|
|
14
|
-
const
|
|
12
|
+
const tagline = "WhatsApp Bot Base";
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
// Info tambahan biar terlihat 'pro'
|
|
15
|
+
const cpus = os.cpus()[0].model.split(' ')[0]; // Mengambil nama CPU singkat
|
|
16
|
+
const platform = os.platform();
|
|
17
|
+
const ram = (os.totalmem() / 1024 / 1024 / 1024).toFixed(1) + " GB";
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
-
const bottom = "╰" + "─".repeat(width) + "╯";
|
|
19
|
+
const width = 50;
|
|
20
20
|
|
|
21
|
+
// Fungsi Helper untuk memusatkan teks
|
|
21
22
|
const center = (text) => {
|
|
22
|
-
const padding = width - text.length;
|
|
23
|
+
const padding = width - 2 - text.length; // -2 untuk border kiri kanan
|
|
23
24
|
const left = Math.floor(padding / 2);
|
|
24
25
|
const right = padding - left;
|
|
25
|
-
return "
|
|
26
|
+
return "║" + " ".repeat(left) + text + " ".repeat(right) + "║";
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Fungsi Helper untuk teks rata kiri dengan label
|
|
30
|
+
const line = (label, info) => {
|
|
31
|
+
const content = ` ${label}: ${info}`;
|
|
32
|
+
const padding = width - 2 - content.length;
|
|
33
|
+
return "║" + content + " ".repeat(padding > 0 ? padding : 0) + "║";
|
|
26
34
|
};
|
|
27
35
|
|
|
36
|
+
const borderTop = "╔" + "═".repeat(width - 2) + "╗";
|
|
37
|
+
const borderMid = "╠" + "═".repeat(width - 2) + "╣";
|
|
38
|
+
const borderBot = "╚" + "═".repeat(width - 2) + "╝";
|
|
39
|
+
|
|
28
40
|
console.log(
|
|
29
|
-
gradient.
|
|
41
|
+
gradient.passion.multiline( // Menggunakan gradient 'passion' (ungu/merah/oranye)
|
|
30
42
|
[
|
|
31
|
-
|
|
43
|
+
borderTop,
|
|
32
44
|
center(chalk.bold(title)),
|
|
33
|
-
center(
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
center(tagline),
|
|
46
|
+
borderMid,
|
|
47
|
+
line("Version ", `v${version}`),
|
|
48
|
+
line("Platform", platform.toUpperCase()),
|
|
49
|
+
line("Memory ", ram),
|
|
50
|
+
line("System ", cpus),
|
|
51
|
+
borderMid,
|
|
52
|
+
center(chalk.italic("Thank you for using Dibo-Baileys 💙")),
|
|
53
|
+
borderBot
|
|
36
54
|
].join("\n")
|
|
37
55
|
)
|
|
38
56
|
);
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|