feat: get current whatsapp web version
This commit is contained in:
parent
702a0ab103
commit
8e011e0233
1 changed files with 12 additions and 0 deletions
|
|
@ -335,6 +335,17 @@ class Client extends EventEmitter {
|
|||
async destroy() {
|
||||
await this.pupBrowser.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of WhatsApp Web currently being run
|
||||
* @returns Promise<string>
|
||||
*/
|
||||
async getWWebVersion() {
|
||||
return await this.pupPage.evaluate(() => {
|
||||
return window.Debug.VERSION;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark as seen for the Chat
|
||||
* @param {string} chatId
|
||||
|
|
@ -348,6 +359,7 @@ class Client extends EventEmitter {
|
|||
}, chatId);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to a specific chatId
|
||||
* @param {string} chatId
|
||||
|
|
|
|||
Loading…
Reference in a new issue