mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 20:49:14 +00:00
feat: get current whatsapp web version
This commit is contained in:
@@ -335,6 +335,17 @@ class Client extends EventEmitter {
|
|||||||
async destroy() {
|
async destroy() {
|
||||||
await this.pupBrowser.close();
|
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
|
* Mark as seen for the Chat
|
||||||
* @param {string} chatId
|
* @param {string} chatId
|
||||||
@@ -348,6 +359,7 @@ class Client extends EventEmitter {
|
|||||||
}, chatId);
|
}, chatId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a message to a specific chatId
|
* Send a message to a specific chatId
|
||||||
* @param {string} chatId
|
* @param {string} chatId
|
||||||
|
|||||||
Reference in New Issue
Block a user