djs-commander
Advanced tools
Comparing version 0.0.41 to 0.0.42
@@ -7,2 +7,8 @@ # Change Log | ||
## [0.0.42] - 2023-03-07 | ||
### Added | ||
- Multiple arguments support for events | ||
## [0.0.41] - 2023-03-07 | ||
@@ -9,0 +15,0 @@ |
@@ -222,3 +222,2 @@ var __defProp = Object.defineProperty; | ||
this._commands = commands; | ||
this._commandsToRegister = JSON.parse(JSON.stringify(commands)); | ||
} | ||
@@ -228,3 +227,3 @@ _registerSlashCommands() { | ||
client: this._client, | ||
commands: this._commandsToRegister, | ||
commands: this._commands, | ||
testServer: this._testServer | ||
@@ -239,6 +238,6 @@ }); | ||
eventFuncPaths.sort(); | ||
this._client.on(eventName, async (arg) => { | ||
this._client.on(eventName, async (...arg) => { | ||
for (const eventFuncPath of eventFuncPaths) { | ||
const eventFunc = require(eventFuncPath); | ||
await eventFunc(arg, this._client, this); | ||
await eventFunc(...arg, this._client, this); | ||
} | ||
@@ -245,0 +244,0 @@ }); |
{ | ||
"name": "djs-commander", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "A command and event handler that works seemlessly with Discord.js", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
Sorry, the diff of this file is not supported yet
26831
598