@open-wa/wa-automate 4.35.3 → 4.35.6
Sign up to get free protection for your applications and to get access to all the features.
package/dist/api/Client.d.ts
CHANGED
@@ -18,7 +18,7 @@ import { Listener } from 'eventemitter2';
|
|
18
18
|
import PriorityQueue from 'p-queue/dist/priority-queue';
|
19
19
|
import { NextFunction, Request, Response } from 'express';
|
20
20
|
import { Call } from './model/call';
|
21
|
-
import { Button, Section } from './model/button';
|
21
|
+
import { Button, LocationButtonBody, Section } from './model/button';
|
22
22
|
import { JsonObject } from 'type-fest';
|
23
23
|
import { ReactionEvent } from './model/reactions';
|
24
24
|
export declare enum namespace {
|
@@ -485,15 +485,15 @@ export declare class Client {
|
|
485
485
|
*/
|
486
486
|
sendPaymentRequest(to: ChatId, amount: number, currency: string, message?: string): Promise<boolean | MessageId>;
|
487
487
|
/**
|
488
|
-
* Send generic quick reply buttons
|
488
|
+
* Send generic quick reply buttons. This is an insiders feature for MD accounts.
|
489
489
|
*
|
490
490
|
* @param {ChatId} to chat id
|
491
|
-
* @param {string} body The body of the buttons message
|
491
|
+
* @param {string | LocationButtonBody} body The body of the buttons message
|
492
492
|
* @param {Button[]} buttons Array of buttons - limit is 3!
|
493
493
|
* @param {string} title The title/header of the buttons message
|
494
494
|
* @param {string} footer The footer of the buttons message
|
495
495
|
*/
|
496
|
-
sendButtons(to: ChatId, body: string, buttons: Button[], title
|
496
|
+
sendButtons(to: ChatId, body: string | LocationButtonBody, buttons: Button[], title?: string, footer?: string): Promise<boolean | MessageId>;
|
497
497
|
/**
|
498
498
|
* Send a banner image
|
499
499
|
*
|
package/dist/api/Client.js
CHANGED
@@ -1272,10 +1272,10 @@ class Client {
|
|
1272
1272
|
});
|
1273
1273
|
}
|
1274
1274
|
/**
|
1275
|
-
* Send generic quick reply buttons
|
1275
|
+
* Send generic quick reply buttons. This is an insiders feature for MD accounts.
|
1276
1276
|
*
|
1277
1277
|
* @param {ChatId} to chat id
|
1278
|
-
* @param {string} body The body of the buttons message
|
1278
|
+
* @param {string | LocationButtonBody} body The body of the buttons message
|
1279
1279
|
* @param {Button[]} buttons Array of buttons - limit is 3!
|
1280
1280
|
* @param {string} title The title/header of the buttons message
|
1281
1281
|
* @param {string} footer The footer of the buttons message
|
@@ -39,6 +39,7 @@ const update_notifier_1 = __importDefault(require("update-notifier"));
|
|
39
39
|
const Client_1 = require("../api/Client");
|
40
40
|
const index_1 = require("../api/model/index");
|
41
41
|
const path = __importStar(require("path"));
|
42
|
+
const os = __importStar(require("os"));
|
42
43
|
const auth_1 = require("./auth");
|
43
44
|
const browser_1 = require("./browser");
|
44
45
|
const events_1 = require("./events");
|
@@ -148,6 +149,8 @@ function create(config = {}) {
|
|
148
149
|
sessionId = 'session';
|
149
150
|
const spinner = new events_1.Spin(sessionId, 'STARTUP', config === null || config === void 0 ? void 0 : config.disableSpins);
|
150
151
|
const qrManager = new auth_1.QRManager(config);
|
152
|
+
const RAM_INFO = `Total: ${parseFloat(`${os.totalmem() / 1000000000}`).toFixed(2)} GB | Free: ${parseFloat(`${os.freemem() / 1000000000}`).toFixed(2)} GB`;
|
153
|
+
logging_1.log.info("RAM INFO", RAM_INFO);
|
151
154
|
try {
|
152
155
|
if (typeof config === 'string')
|
153
156
|
console.error("AS OF VERSION 3+ YOU CAN NO LONGER SET THE SESSION ID AS THE FIRST PARAMETER OF CREATE. CREATE CAN ONLY TAKE A CONFIG OBJECT. IF YOU STILL HAVE CONFIGS AS A SECOND PARAMETER, THEY WILL HAVE NO EFFECT! PLEASE SEE DOCS.");
|
@@ -203,7 +206,8 @@ function create(config = {}) {
|
|
203
206
|
WA_AUTOMATE_VERSION,
|
204
207
|
BROWSER_VERSION,
|
205
208
|
OS,
|
206
|
-
START_TS
|
209
|
+
START_TS,
|
210
|
+
RAM_INFO
|
207
211
|
};
|
208
212
|
if ((config === null || config === void 0 ? void 0 : config.logDebugInfoAsObject) || (config === null || config === void 0 ? void 0 : config.disableSpins))
|
209
213
|
spinner.succeed(`Debug info: ${JSON.stringify(debugInfo, null, 2)}`);
|
package/package.json
CHANGED