Skip to content

Commit

Permalink
Use rest operator instead of arguments (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz authored and abalabahaha committed Nov 24, 2019
1 parent b0c7a07 commit 1e59a20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/gateway/Shard.js
Expand Up @@ -1838,10 +1838,10 @@ class Shard extends EventEmitter {
return base;
}

emit(event) {
this.client.emit.apply(this.client, arguments);
emit(event, ...args) {
this.client.emit.call(this.client, event, ...args);
if(event !== "error" || this.listeners("error").length > 0) {
super.emit.apply(this, arguments);
super.emit.call(this, event, ...args);
}
}
}
Expand Down

0 comments on commit 1e59a20

Please sign in to comment.