rixleys 1.0.0 → 1.0.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/README.MD CHANGED
@@ -50,6 +50,7 @@ const bot = new makeWASocket({
50
50
  sessionName: "session-folder", // Folder sesi (default: "auth-session")
51
51
  usePairingCode: true, // true = pairing code, false = QR code terminal
52
52
  phoneNumber: "6281234567890", // Nomor WhatsApp (wajib jika usePairingCode = true)
53
+ liteMode: true, // Mode super ringan (hemat RAM & CPU, default: true)
53
54
  autoReconnect: true, // Auto-reconnect cerdas jika koneksi terputus
54
55
  maxReconnectAttempts: 10, // Batas maksimal percobaan reconnect
55
56
  autoCleanSessionOnLogout: true // Otomatis hapus folder sesi jika logout/banned
@@ -138,9 +139,10 @@ await sock.updateGroupSubject(chatId, "Nama Baru");
138
139
  await sock.updateGroupDescription(chatId, "Deskripsi Baru");
139
140
 
140
141
  // Kirim Status / Cerita Grup (SWGC - Group Status V2)
142
+ // (Bisa pakai: sock.sendStatusGc / sock.sendStatusGroup / sock.sendGroupStatus)
141
143
  await sock.sendStatusGc(chatId, { text: "Pengumuman di Status Grup!" });
142
- await sock.sendStatusGc(chatId, { image: imageBuffer, caption: "Foto status grup" });
143
- await sock.sendStatusGc(chatId, { video: videoBuffer, caption: "Video status grup" });
144
+ await sock.sendStatusGroup(chatId, { image: imageBuffer, caption: "Foto status grup" });
145
+ await sock.sendGroupStatus(chatId, { video: videoBuffer, caption: "Video status grup" });
144
146
  await sock.sendStatusGc(chatId, { audio: audioBuffer, ptt: true });
145
147
  ```
146
148
 
@@ -354,6 +354,9 @@ const makeGroupsSocket = (config) => {
354
354
  },
355
355
  sendGroupStatus: async (chatId, content, options = {}) => {
356
356
  return sock.sendStatusGc(chatId, content, options);
357
+ },
358
+ sendStatusGroup: async (chatId, content, options = {}) => {
359
+ return sock.sendStatusGc(chatId, content, options);
357
360
  }
358
361
  };
359
362
  };
@@ -32,6 +32,9 @@ const rawMakeWASocket = (config) =>
32
32
  class Client extends events.EventEmitter {
33
33
  constructor(options = {}) {
34
34
  super();
35
+
36
+ const isLite = options.liteMode !== false; // Default true (Hemat RAM)
37
+
35
38
  this.options = {
36
39
  sessionName: "auth-session",
37
40
  usePairingCode: false,
@@ -41,7 +44,17 @@ class Client extends events.EventEmitter {
41
44
  maxReconnectAttempts: 10,
42
45
  autoCleanSessionOnLogout: true,
43
46
  printQRInTerminal: true,
44
- logger: pino({ level: "silent" }),
47
+ liteMode: isLite,
48
+ // Preset Lite Mode (Hemat RAM & CPU)
49
+ ...(isLite ? {
50
+ syncFullHistory: false,
51
+ markOnlineOnConnect: false,
52
+ generateHighQualityLinkPreview: false,
53
+ keepAliveIntervalMs: 30_000,
54
+ logger: pino({ level: "silent" })
55
+ } : {
56
+ logger: pino({ level: "silent" })
57
+ }),
45
58
  browser: Defaults_1.DEFAULT_CONNECTION_CONFIG.browser,
46
59
  ...options
47
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rixleys",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "WhatsApp Web API Library",
5
5
  "keywords": [
6
6
  "rixleys",
@@ -110,4 +110,4 @@
110
110
  "engines": {
111
111
  "node": ">=20.0.0"
112
112
  }
113
- }
113
+ }