Skip to content
This repository was archived by the owner on Dec 6, 2021. It is now read-only.

Commit 3e7feb8

Browse files
author
pyraxo
committed
Supply client to end of object modules
1 parent 1b4d9d9 commit 3e7feb8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/Router.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Router extends Collection {
121121
const module = this.get(name)
122122
if (!module) continue
123123
try {
124-
if (!module._client) args.unshift(this._client)
124+
if (!module._client) args.push(this._client)
125125
module[events[name]](...args)
126126
} catch (err) {
127127
this._client.throwOrEmit('router:runError', err)

test/modules/MessageHandler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ module.exports = {
33
events: {
44
messageCreate: 'onMessage'
55
},
6-
onMessage: (client, msg) => console.log(msg.id)
6+
onMessage: (msg, client) => console.log(msg.id)
77
}

0 commit comments

Comments
 (0)