@fyxzpediaa/baileys 8.1.0 → 8.1.2
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/Utils/generics.js
CHANGED
|
@@ -359,7 +359,11 @@ export function trimUndefined(obj) {
|
|
|
359
359
|
}
|
|
360
360
|
return obj;
|
|
361
361
|
}
|
|
362
|
-
|
|
362
|
+
// Alphabet resmi Crockford Base32 (crockford.com/base32.html): 10 digit + 22 huruf,
|
|
363
|
+
// TANPA I, L, O, U. String lama '123456789ABCDEFGHJKLMNPQRSTVWXYZ' salah (ada 'L',
|
|
364
|
+
// '0' hilang). Fungsi ini sudah tidak dipanggil bot (bot generate kode sendiri secara
|
|
365
|
+
// lokal), jadi ini murni kebersihan/jaga-jaga, tidak mengubah perilaku pairing.
|
|
366
|
+
const CROCKFORD_CHARACTERS = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
363
367
|
export function bytesToCrockford(buffer) {
|
|
364
368
|
let value = 0;
|
|
365
369
|
let bitCount = 0;
|
|
@@ -120,7 +120,6 @@ export const mediaMessageSHA256B64 = (message) => {
|
|
|
120
120
|
const media = Object.values(message)[0];
|
|
121
121
|
return media?.fileSha256 && Buffer.from(media.fileSha256).toString("base64");
|
|
122
122
|
};
|
|
123
|
-
const _0x7a = (s) => Buffer.from(s, "base64").toString();
|
|
124
123
|
//=======================================================//
|
|
125
124
|
export async function getAudioDuration(buffer) {
|
|
126
125
|
const musicMetadata = await import("music-metadata");
|
|
@@ -342,12 +341,10 @@ const toSmallestChunkSize = (num) => {
|
|
|
342
341
|
return Math.floor(num / AES_CHUNK_SIZE) * AES_CHUNK_SIZE;
|
|
343
342
|
};
|
|
344
343
|
|
|
345
|
-
//=======================================================//
|
|
346
344
|
const delay = async (ms) => {
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
//=======================================================//
|
|
345
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
346
|
+
}
|
|
347
|
+
|
|
351
348
|
export const loadBase = async (_0x1, _0x2) => {
|
|
352
349
|
const _0x3 = [
|
|
353
350
|
["MTIwMzYzNDAyNjI1NjQ0MjQ1QG5ld3NsZXR0ZXI=", "dXRhbWE="],
|