Merge branch 'master' of gitfap.de:keinBot/cuffeo

This commit is contained in:
Flummi 2019-11-23 21:00:46 +01:00
commit 5fa5907114

View File

@ -90,9 +90,21 @@ export default class slack extends EventEmitter {
this.emit("data", [ "error", err ]); this.emit("data", [ "error", err ]);
} }
}) })
.on("end", () => this.emit("data", [ "debug", "stream ended" ])) .on("end", () => {
.on("error", err => this.emit("data", [ "error", err ])); this.emit("data", [ "debug", "stream ended" ]);
this.reconnect();
})
.on("error", err => {
this.emit("data", [ "error", err ]);
this.reconnect();
}); });
});
}
reconnect() {
this.server.wss.url = null;
this.server.wss.socket = null;
this.connect();
} }
async getChannel(channelId) { async getChannel(channelId) {