Skip to content

Commit

Permalink
fix error client undefined in client.emit
Browse files Browse the repository at this point in the history
  • Loading branch information
Desvelao committed Oct 10, 2019
1 parent a145159 commit 24087e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class Client extends Eris.Client {
* @prop {function} from - Splice message content from argument number to end message
* @prop {function} until - Splice message content from begin until argument number
* @prop {function} after - Same content
* @prop {Client} client - Client instance
* @prop {array} - Each word form message is in a slot
*/
args.prefix = prefix
Expand Down Expand Up @@ -255,7 +256,7 @@ class Client extends Eris.Client {
* @param {Command} command - Command
*/
logger.error('Error Command =>', err)
this.emit('aghanim:command:error', err, msg, args, client, command)
this.emit('aghanim:command:error', err, msg, args, this, command)
}

}
Expand All @@ -278,7 +279,7 @@ class Client extends Eris.Client {
* @param {Client} client - Client instance
* @param {Component} component - Component
*/
this.emit('aghanim:component:error', err, eventname, client, component)
this.emit('aghanim:component:error', err, eventname, this, component)
}
})
}
Expand Down

0 comments on commit 24087e2

Please sign in to comment.