@prototypevip/baileys 0.0.9 → 0.1.0
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/Socket/index.js +5 -12
- package/package.json +1 -1
package/lib/Socket/index.js
CHANGED
|
@@ -48,18 +48,11 @@ async function loadAntiBan() {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
const presets = await import("../AntiBan/presets.js");
|
|
58
|
-
_PRESETS = presets.PRESETS || {};
|
|
59
|
-
} catch {}
|
|
60
|
-
} catch (e) {
|
|
61
|
-
_antiBanLoadError = e;
|
|
62
|
-
}
|
|
51
|
+
// Best-effort background load (fire-and-forget, NOT top-level await —
|
|
52
|
+
// awaiting here breaks require() on this ESM package with ERR_REQUIRE_ASYNC_MODULE).
|
|
53
|
+
// If antiBan is requested before this finishes, makeWASocket() below will just
|
|
54
|
+
// warn and skip protection instead of crashing.
|
|
55
|
+
loadAntiBan();
|
|
63
56
|
|
|
64
57
|
/**
|
|
65
58
|
* Create a WhatsApp socket.
|