@neoxr/wb 5.10.3 → 5.10.4
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 +83 -0
- package/lib/Server/create.js +1 -1
- package/lib/Server/instance.js +1 -1
- package/lib/Server/loader.js +1 -1
- package/lib/Server/validator.js +1 -1
- package/lib/Socket/_connection.js +1 -1
- package/lib/Socket/_connection.js.map +1 -1
- package/lib/Socket/_serialize.js +1 -1
- package/lib/Socket/connection.js +1 -1
- package/lib/Socket/connection.js.map +1 -1
- package/lib/Socket/connector.js +1 -1
- package/lib/Socket/connector.js.map +1 -1
- package/lib/Socket/message.js +1 -1
- package/lib/Socket/serialize.js +1 -1
- package/lib/Utils/caching.js +1 -1
- package/lib/Utils/chiper.js +1 -1
- package/lib/Utils/cmd.js +1 -1
- package/lib/Utils/converter.js +1 -1
- package/lib/Utils/cooldown.js +1 -1
- package/lib/Utils/exif.js +1 -1
- package/lib/Utils/functions.js +1 -1
- package/lib/Utils/jid-helper.js +1 -1
- package/lib/Utils/loader.js +1 -1
- package/lib/Utils/logs.js +1 -1
- package/lib/Utils/memory.js +1 -1
- package/lib/Utils/queue.js +1 -1
- package/lib/Utils/scraper.js +1 -1
- package/lib/Utils/session.js +1 -1
- package/lib/Utils/spam.js +1 -1
- package/lib/Utils/types.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,89 @@ To see an example in action, visit the [neoxr-bot](https://github.com/neoxr/neox
|
|
|
8
8
|
|
|
9
9
|
<p align="center"><img align="center" width="100%" src="https://raw.githubusercontent.com/neoxr/neoxr/refs/heads/main/wb.png" /></p>
|
|
10
10
|
|
|
11
|
+
### Options
|
|
12
|
+
|
|
13
|
+
The following is the default configuration used when initializing a new Baileys connection. This setup is tailored for projects using this lib, and includes options for session management, plugin loading, and handling bot-specific behavior.
|
|
14
|
+
|
|
15
|
+
```Javascript
|
|
16
|
+
new Baileys({
|
|
17
|
+
/**
|
|
18
|
+
* Plugins model
|
|
19
|
+
* Choose one --neoxr-v1 or --neoxr-v2.
|
|
20
|
+
*/
|
|
21
|
+
type: '--neoxr-v1',
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Path to the plugins directory.
|
|
25
|
+
* Required if your system dynamically loads plugins.
|
|
26
|
+
*/
|
|
27
|
+
plugsdir: 'plugins',
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Path to the session directory.
|
|
31
|
+
* Stores session data such as creds.json and keys.
|
|
32
|
+
*/
|
|
33
|
+
session: 'session',
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* If true, keeps the bot status always online.
|
|
37
|
+
*/
|
|
38
|
+
online: true,
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* If true, disables WhatsApp's disappearing messages behavior for your client.
|
|
42
|
+
* Useful if you want messages to remain even if disappearing mode is active.
|
|
43
|
+
*/
|
|
44
|
+
bypass_disappearing: true,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A function to determine if a message was sent by the bot.
|
|
48
|
+
* This is important for filtering bot messages vs. user messages.
|
|
49
|
+
* Examples: IDs starting with "3EB0" or "BAE", or containing a dash (-).
|
|
50
|
+
*/
|
|
51
|
+
bot: (id) => {
|
|
52
|
+
return (id.startsWith('3EB0') && id.length === 40) || id.startsWith('BAE') || /[-]/.test(id)
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* WhatsApp protocol version used by the client.
|
|
57
|
+
* Should match the currently supported version by WhatsApp.
|
|
58
|
+
* Format: [major, minor, build]
|
|
59
|
+
*/
|
|
60
|
+
version: [2, 3000, 1022545672], // Can also use: env.pairing.version
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* If true, the client runs in server mode (non-interactive).
|
|
64
|
+
* Can be enabled via the "--server" command-line argument.
|
|
65
|
+
*/
|
|
66
|
+
server: process.argv.includes('--server'),
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Override protocol version (optional).
|
|
70
|
+
* Useful if dynamically configured via environment.
|
|
71
|
+
*/
|
|
72
|
+
version: env.pairing.version
|
|
73
|
+
|
|
74
|
+
}, {
|
|
75
|
+
/**
|
|
76
|
+
* Information about the emulated browser for WhatsApp Web.
|
|
77
|
+
* Format: [OS, Browser Name, Browser Version]
|
|
78
|
+
* Displayed under "Linked Devices" in the WhatsApp mobile app.
|
|
79
|
+
*/
|
|
80
|
+
browser: ['Ubuntu', 'Firefox', '20.0.00'],
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Function to ignore specific JIDs (WhatsApp IDs).
|
|
84
|
+
* Return true to ignore the JID, false to accept it.
|
|
85
|
+
* Example: ignore newsletter and bot messages.
|
|
86
|
+
*/
|
|
87
|
+
shouldIgnoreJid: (jid) => {
|
|
88
|
+
return /(newsletter|bot)/.test(jid)
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
|
|
11
94
|
### Connection
|
|
12
95
|
|
|
13
96
|
Simple way to make connection
|