@than-xs/baileys 2.0.3 → 2.0.5
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.
- package/lib/index.js +20 -31
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -6,50 +6,39 @@ const fs = require("fs");
|
|
|
6
6
|
const stats = fs.statSync(__filename);
|
|
7
7
|
const lastUpdate = new Date(stats.mtime).toLocaleString();
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
"Baileys Custom Build",
|
|
11
|
-
"by @thanror",
|
|
12
|
-
`Last Update : ${lastUpdate}`,
|
|
13
|
-
"Status : Active & Ready"
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
const maxLength = Math.max(...lines.map(l => l.length));
|
|
17
|
-
const horizontal = "━".repeat(maxLength + 6);
|
|
18
|
-
|
|
19
|
-
let hueOffset = 0;
|
|
9
|
+
const randomHue = Math.floor(Math.random() * 360);
|
|
20
10
|
|
|
21
11
|
function gradient(text, offset = 0) {
|
|
22
12
|
return text
|
|
23
13
|
.split("")
|
|
24
14
|
.map((char, i) => {
|
|
25
|
-
const hue = (
|
|
26
|
-
return chalk.hsl(hue, 100,
|
|
15
|
+
const hue = (randomHue + offset + i * 5) % 360;
|
|
16
|
+
return chalk.hsl(hue, 100, 55)(char);
|
|
27
17
|
})
|
|
28
18
|
.join("");
|
|
29
19
|
}
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
const lines = [
|
|
22
|
+
"Baileys Custom Build",
|
|
23
|
+
"by @thanror",
|
|
24
|
+
`Last Update : ${lastUpdate}`,
|
|
25
|
+
"Status : Active & Ready"
|
|
26
|
+
];
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const content = " " + line + padding + " ";
|
|
40
|
-
console.log(gradient("┃ " + content + " ┃", index * 30));
|
|
41
|
-
});
|
|
28
|
+
const maxLength = Math.max(...lines.map(l => l.length));
|
|
29
|
+
const horizontal = "━".repeat(maxLength + 4);
|
|
42
30
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
31
|
+
console.log();
|
|
32
|
+
console.log(gradient("┏" + horizontal));
|
|
46
33
|
|
|
47
|
-
|
|
34
|
+
lines.forEach((line, index) => {
|
|
35
|
+
const padding = " ".repeat(maxLength - line.length);
|
|
36
|
+
const content = " " + line + padding + " ";
|
|
37
|
+
console.log(gradient("┃" + content, index * 20));
|
|
38
|
+
});
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
render();
|
|
52
|
-
}, 1000);
|
|
40
|
+
console.log(gradient("┗" + horizontal, 100));
|
|
41
|
+
console.log();
|
|
53
42
|
|
|
54
43
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
55
44
|
if (k2 === undefined) k2 = k;
|