mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-19 03:59:16 +00:00
add disconnect reason
This commit is contained in:
@@ -206,8 +206,9 @@ class Client extends EventEmitter {
|
||||
/**
|
||||
* Emitted when the client has been disconnected
|
||||
* @event Client#disconnected
|
||||
* @param {WAState} reason state that caused the disconnect
|
||||
*/
|
||||
this.emit(Events.DISCONNECTED);
|
||||
this.emit(Events.DISCONNECTED, state);
|
||||
this.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user