aunubaileys 1.0.53 → 1.0.54

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/README.md CHANGED
@@ -64,9 +64,13 @@ Everything else is pure upstream. When upstream moves, we rebase the patch layer
64
64
 
65
65
 
66
66
 
67
+ ### ✂️ What's new in 1.0.54 / Baru di 1.0.54
68
+
69
+ - **Pruning.** `aunuCountdown` and `aunuSplitText` (added in 1.0.53) are **removed**: the AunuBaileys experimental line keeps only the rare features, and those two were generic utilities. The experimental API is back to **15 methods**; `aunuSideText`, `aunuGhostMention` and `aunuFakeForward` stay.
70
+
67
71
  ### 🧪 What's new in 1.0.53 / Baru di 1.0.53 — EXPERIMENTAL
68
72
 
69
- - 📇 **Five more experimental features (17 total).** **`aunuSideText`** — text with a small picture **at the side**: a name/title beside the picture and the chat under the name (the preview layout group menus use); the picture can be someone's real profile picture (`profileOf`), your own image, the built-in grey **"deleted account"** avatar (`deletedProfile: true`), or no picture at all. **`aunuGhostMention`** — mention every group member invisibly: everyone is notified, the text shows no @ pile-up. **`aunuFakeForward`** — the forwarded look (high forwarding score, optional channel attribution). **`aunuCountdown`** — one message edited down a countdown to a final text. **`aunuSplitText`** — a long text sent as a self-quoting chain. New exported utils: `getDeletedProfileImage()` (the embedded deleted-account avatar PNG) and `buildSideTextAdReply()`.
73
+ - 📇 **Three new experimental features.** **`aunuSideText`** — text with a small picture **at the side**: a name/title beside the picture and the chat under the name (the preview layout group menus use); the picture can be someone's real profile picture (`profileOf`), your own image, the built-in grey **"deleted account"** avatar (`deletedProfile: true`), or no picture at all. **`aunuGhostMention`** — mention every group member invisibly: everyone is notified, the text shows no @ pile-up. **`aunuFakeForward`** — the forwarded look (high forwarding score, optional channel attribution). New exported utils: `getDeletedProfileImage()` (the embedded deleted-account avatar PNG) and `buildSideTextAdReply()`. (This release also briefly carried `aunuCountdown`/`aunuSplitText`, removed again in 1.0.54.)
70
74
 
71
75
  ### 🧪 What's new in 1.0.52 / Baru di 1.0.52 — EXPERIMENTAL
72
76
 
@@ -114,7 +114,5 @@ export interface AunuExperimentalAPI {
114
114
  aunuSideText: (jid: string, options: AunuSideTextOptions) => Promise<any>;
115
115
  aunuGhostMention: (jid: string, content: Record<string, unknown>, options?: MiscMessageGenerationOptions) => Promise<any>;
116
116
  aunuFakeForward: (jid: string, content: Record<string, unknown>, options?: { score?: number; channelName?: string; channelJid?: string; serverMessageId?: number; messageOptions?: MiscMessageGenerationOptions }) => Promise<any>;
117
- aunuCountdown: (jid: string, options?: { from?: number; intervalMs?: number; format?: (n: number) => string; finalText?: string; messageOptions?: MiscMessageGenerationOptions }) => Promise<any>;
118
- aunuSplitText: (jid: string, text: string, options?: { maxChars?: number; messageOptions?: MiscMessageGenerationOptions }) => Promise<any[]>;
119
117
  }
120
118
  export declare const attachAunuExperimental: <T>(sock: T) => T & AunuExperimentalAPI;
@@ -50,10 +50,6 @@ const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
50
50
  * invisibly (notifications fire, no @ text shows).
51
51
  * 15. Fake forward — `aunuFakeForward`: the forwarded look with a high
52
52
  * score and optional channel attribution.
53
- * 16. Countdown — `aunuCountdown`: one message edited down a countdown
54
- * to a final text.
55
- * 17. Split text — `aunuSplitText`: a long text as a self-quoting
56
- * chain of messages.
57
53
  */
58
54
  export const attachAunuExperimental = (sock) => {
59
55
  const scheduled = new Map();
@@ -363,67 +359,6 @@ export const attachAunuExperimental = (sock) => {
363
359
  }
364
360
  return sock.sendMessage(jid, { ...content, contextInfo }, options.messageOptions);
365
361
  };
366
- /**
367
- * EXPERIMENTAL (1.0.53): countdown — send one message, then edit it
368
- * down from `from` to 0 on an interval, finishing with `finalText`.
369
- */
370
- sock.aunuCountdown = async (jid, options = {}) => {
371
- const from = options.from ?? 5;
372
- const intervalMs = options.intervalMs ?? 1000;
373
- const format = options.format ?? ((n) => `\u23F3 ${n}`);
374
- let msg = await sock.sendMessage(jid, { text: format(from) }, options.messageOptions);
375
- const key = msg.key;
376
- for (let n = from - 1; n >= 0; n--) {
377
- await delay(intervalMs);
378
- msg = await sock.sendMessage(jid, { text: format(n), edit: key }, options.messageOptions);
379
- }
380
- if (options.finalText != null) {
381
- await delay(intervalMs);
382
- msg = await sock.sendMessage(jid, { text: options.finalText, edit: key }, options.messageOptions);
383
- }
384
- return msg;
385
- };
386
- /**
387
- * EXPERIMENTAL (1.0.53): split text — a long text is sent as a chain
388
- * of messages, each quoting the previous one, split on paragraph
389
- * boundaries where possible.
390
- */
391
- sock.aunuSplitText = async (jid, text, options = {}) => {
392
- const maxChars = options.maxChars ?? 1000;
393
- const chunks = [];
394
- let current = '';
395
- for (const para of String(text).split(/\n\n+/)) {
396
- const pieces = [];
397
- let rest = para;
398
- while (rest.length > maxChars) {
399
- let cut = rest.lastIndexOf(' ', maxChars);
400
- if (cut < maxChars * 0.5)
401
- cut = maxChars;
402
- pieces.push(rest.slice(0, cut));
403
- rest = rest.slice(cut).trimStart();
404
- }
405
- if (rest)
406
- pieces.push(rest);
407
- for (const piece of pieces) {
408
- if (current && (current.length + 2 + piece.length) > maxChars) {
409
- chunks.push(current);
410
- current = piece;
411
- }
412
- else
413
- current = current ? current + '\n\n' + piece : piece;
414
- }
415
- }
416
- if (current)
417
- chunks.push(current);
418
- const sent = [];
419
- let prev;
420
- for (const chunk of chunks) {
421
- const msg = await sock.sendMessage(jid, { text: chunk }, prev ? { ...options.messageOptions, quoted: prev } : options.messageOptions);
422
- sent.push(msg);
423
- prev = msg;
424
- }
425
- return sent;
426
- };
427
362
  return sock;
428
363
  };
429
364
  //# sourceMappingURL=aunu-experimental.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aunubaileys",
3
3
  "type": "module",
4
- "version": "1.0.53",
4
+ "version": "1.0.54",
5
5
  "description": "AunuBaileys \u2014 a WhatsApp Web API for bots that never sleep. Full upstream power with the beloved in-memory store restored and pairing that just works. Forged by AunuCore.",
6
6
  "keywords": [
7
7
  "whatsapp",