Add debug stuff

This commit is contained in:
Amish Shah
2016-09-04 12:31:10 +01:00
parent f23c07a08e
commit 7475f734ac
5 changed files with 8 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ class WebSocketManager {
* @param {string} gateway The gateway to connect to
*/
connect(gateway) {
this.client.emit('debug', `connecting to gateway ${gateway}`);
this.normalReady = false;
this.status = Constants.Status.CONNECTING;
this.ws = new WebSocket(gateway);
@@ -108,6 +109,7 @@ class WebSocketManager {
* Run whenever the gateway connections opens up
*/
eventOpen() {
this.client.emit('debug', 'connection to gateway opened');
if (this.reconnecting) this._sendResume();
else this._sendNewIdentify();
}