mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Change default connect options
This commit is contained in:
@@ -101,13 +101,15 @@ conn.connectOptions = {
|
|||||||
*/
|
*/
|
||||||
waitOnlyForLastMessage?: false
|
waitOnlyForLastMessage?: false
|
||||||
/** max time for the phone to respond to a connectivity test */
|
/** max time for the phone to respond to a connectivity test */
|
||||||
phoneResponseTime?: 7500
|
phoneResponseTime?: 10_000
|
||||||
/** minimum time between new connections */
|
/** minimum time between new connections */
|
||||||
connectCooldownMs?: 3000
|
connectCooldownMs?: 3000
|
||||||
/** agent used for WS connections (could be a proxy agent) */
|
/** agent used for WS connections (could be a proxy agent) */
|
||||||
agent?: Agent = undefined
|
agent?: Agent = undefined
|
||||||
/** agent used for fetch requests -- uploading/downloading media */
|
/** agent used for fetch requests -- uploading/downloading media */
|
||||||
fetchAgent?: Agent = undefined
|
fetchAgent?: Agent = undefined
|
||||||
|
/** always uses takeover for connecting */
|
||||||
|
alwaysUseTakeover: true
|
||||||
} as WAConnectOptions
|
} as WAConnectOptions
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@adiwajshing/baileys",
|
"name": "@adiwajshing/baileys",
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"description": "WhatsApp Web API",
|
"description": "WhatsApp Web API",
|
||||||
"homepage": "https://github.com/adiwajshing/Baileys",
|
"homepage": "https://github.com/adiwajshing/Baileys",
|
||||||
"main": "lib/WAConnection/WAConnection.js",
|
"main": "lib/WAConnection/WAConnection.js",
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ export class WAConnection extends EventEmitter {
|
|||||||
waitForChats: true,
|
waitForChats: true,
|
||||||
maxRetries: 5,
|
maxRetries: 5,
|
||||||
connectCooldownMs: 3000,
|
connectCooldownMs: 3000,
|
||||||
phoneResponseTime: 7_500,
|
phoneResponseTime: 10_000,
|
||||||
alwaysUseTakeover: false
|
alwaysUseTakeover: true
|
||||||
}
|
}
|
||||||
/** When to auto-reconnect */
|
/** When to auto-reconnect */
|
||||||
autoReconnect = ReconnectMode.onConnectionLost
|
autoReconnect = ReconnectMode.onConnectionLost
|
||||||
|
|||||||
Reference in New Issue
Block a user