@realvare/based 2.5.1 โ 2.5.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 +7 -7
- package/lib/Socket/messages-send.js +1 -0
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -47,7 +47,7 @@ Inizia creando un bot semplice. Questa sezione include esempi base per l'autenti
|
|
|
47
47
|
### Esempio Base - Avvio Bot
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
|
-
import makeWASocket, { DisconnectReason, useMultiFileAuthState, getPerformanceConfig, setPerformanceConfig } from '
|
|
50
|
+
import makeWASocket, { DisconnectReason, useMultiFileAuthState, getPerformanceConfig, setPerformanceConfig } from 'based';
|
|
51
51
|
|
|
52
52
|
// Configura performance e cache
|
|
53
53
|
setPerformanceConfig({
|
|
@@ -99,7 +99,7 @@ startBot().catch(console.error);
|
|
|
99
99
|
### Gestione Messaggi Base con LID/JID
|
|
100
100
|
|
|
101
101
|
```typescript
|
|
102
|
-
import makeWASocket, { getSenderLid, toJid, getCacheStats, validateJid, Logger } from '
|
|
102
|
+
import makeWASocket, { getSenderLid, toJid, getCacheStats, validateJid, Logger } from 'based';
|
|
103
103
|
|
|
104
104
|
// ... (codice di creazione sock qui)
|
|
105
105
|
|
|
@@ -564,7 +564,7 @@ Il supporto LID/JID รจ un punto di forza di questa libreria, risolvendo problemi
|
|
|
564
564
|
|
|
565
565
|
```typescript
|
|
566
566
|
// Nel tuo file main
|
|
567
|
-
import makeWASocket, { getSenderLid, toJid } from '
|
|
567
|
+
import makeWASocket, { getSenderLid, toJid } from 'based';
|
|
568
568
|
// ... (autenticazione e creazione sock)
|
|
569
569
|
|
|
570
570
|
conn.ev.on('messages.upsert', async ({ messages }) => {
|
|
@@ -610,7 +610,7 @@ export async function handleMessage(sock, msg) {
|
|
|
610
610
|
La libreria ora include un sistema di cache avanzato per ottimizzare le conversioni LID/JID:
|
|
611
611
|
|
|
612
612
|
```typescript
|
|
613
|
-
import { getCacheStats, clearCache, setPerformanceConfig } from '
|
|
613
|
+
import { getCacheStats, clearCache, setPerformanceConfig } from 'based';
|
|
614
614
|
|
|
615
615
|
// Configura cache personalizzata
|
|
616
616
|
setPerformanceConfig({
|
|
@@ -633,7 +633,7 @@ clearCache();
|
|
|
633
633
|
### ๐ก๏ธ Validazione JID Avanzata
|
|
634
634
|
|
|
635
635
|
```typescript
|
|
636
|
-
import { validateJid, Logger } from '
|
|
636
|
+
import { validateJid, Logger } from 'based';
|
|
637
637
|
|
|
638
638
|
const jid = '1234567890@s.whatsapp.net';
|
|
639
639
|
const validation = validateJid(jid);
|
|
@@ -648,7 +648,7 @@ if (validation.isValid) {
|
|
|
648
648
|
### ๐ Logging Condizionale
|
|
649
649
|
|
|
650
650
|
```typescript
|
|
651
|
-
import { Logger, setPerformanceConfig } from '
|
|
651
|
+
import { Logger, setPerformanceConfig } from 'based';
|
|
652
652
|
|
|
653
653
|
// Configura logging
|
|
654
654
|
setPerformanceConfig({
|
|
@@ -668,7 +668,7 @@ Logger.error('Error occurred');
|
|
|
668
668
|
### ๐ง Configurazione Performance
|
|
669
669
|
|
|
670
670
|
```typescript
|
|
671
|
-
import { setPerformanceConfig, getPerformanceConfig } from '
|
|
671
|
+
import { setPerformanceConfig, getPerformanceConfig } from 'based';
|
|
672
672
|
|
|
673
673
|
// Configurazione completa
|
|
674
674
|
setPerformanceConfig({
|
|
@@ -10,6 +10,7 @@ const crypto_1 = require("crypto");
|
|
|
10
10
|
const WAProto_1 = require("../../WAProto");
|
|
11
11
|
const Defaults_1 = require("../Defaults");
|
|
12
12
|
const Utils_1 = require("../Utils");
|
|
13
|
+
const retry_1 = require("../Utils/retry");
|
|
13
14
|
const link_preview_1 = require("../Utils/link-preview");
|
|
14
15
|
const WABinary_1 = require("../WABinary");
|
|
15
16
|
const WAUSync_1 = require("../WAUSync");
|