v8 - Emit error event on sendTyping falures instead of failing silently (#769)

* Properly emit error on sendTyping failure.

* Properly emit error on sendTyping failure.
This commit is contained in:
Jacob
2016-10-03 17:44:17 -04:00
committed by abal
parent 2b1fcf168c
commit 72be5e6498
2 changed files with 2 additions and 2 deletions

View File

@@ -1624,7 +1624,7 @@ var InternalClient = (function () {
_this33.intervals.typing[channel.id] = setInterval(function () { _this33.intervals.typing[channel.id] = setInterval(function () {
return _this33.sendTyping(channel)["catch"](function (error) { return _this33.sendTyping(channel)["catch"](function (error) {
return _this33.emit("error", error); return _this33.client.emit("error", error);
}); });
}, 4000); }, 4000);

View File

@@ -1405,7 +1405,7 @@ export default class InternalClient {
this.intervals.typing[channel.id] = setInterval( this.intervals.typing[channel.id] = setInterval(
() => this.sendTyping(channel) () => this.sendTyping(channel)
.catch(error => this.emit("error", error)), .catch(error => this.client.emit("error", error)),
4000 4000
); );