From 24087e26d99f94dbf98a810974e791b1a645aaad Mon Sep 17 00:00:00 2001 From: Desvelao Date: Thu, 10 Oct 2019 22:28:07 +0200 Subject: [PATCH] fix error client undefined in client.emit --- src/Client.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Client.js b/src/Client.js index 8868530..19182e5 100644 --- a/src/Client.js +++ b/src/Client.js @@ -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 @@ -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) } } @@ -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) } }) }