@dappaoffc/baileys-mod 4.0.2 → 4.0.3

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.
Files changed (2) hide show
  1. package/lib/index.js +23 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,11 +1,29 @@
1
1
  //=======================================================//
2
2
 
3
- import chalk from "chalk";
3
+ (async () => {
4
+ let chalk;
4
5
 
5
- console.log();
6
- console.log(chalk.white("## Baileys Mod by Dappa"));
7
- console.log(chalk.blue("• https://t.me/kieldppa"));
8
- console.log();
6
+ try {
7
+ // Untuk chalk v5+ (ESM)
8
+ chalk = (await import('chalk')).default;
9
+ } catch {
10
+ try {
11
+ // Untuk chalk v4 (CJS)
12
+ chalk = require('chalk');
13
+ } catch {
14
+ // Fallback kalau chalk tidak ada
15
+ chalk = {
16
+ white: (x) => x,
17
+ blue: (x) => x
18
+ };
19
+ }
20
+ }
21
+
22
+ console.log();
23
+ console.log(chalk.white("## Baileys Mod by Dappa"));
24
+ console.log(chalk.blue("• https://t.me/kieldppa"));
25
+ console.log();
26
+ })();
9
27
 
10
28
  import makeWASocket from "./Socket/index.js";
11
29
  //=======================================================//
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dappaoffc/baileys-mod",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "Websocket Whatsapp API for Node.js",
5
5
  "keywords": [
6
6
  "whatsapp",