From a2b9714aa501cee6014317af09c0c902564296b1 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sun, 10 Jul 2022 18:13:58 +0300 Subject: [PATCH] temp logging --- src/structure/components/observers/CommandHandler.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index 2067de9..d4b9499 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -82,7 +82,11 @@ class CommandHandler extends Observer { const response = await this._parseInteraction(interaction, command); if (await this._parseResponse(invoker, response)) return; - await this._executeCommand(invoker, response.options); + try { + await this._executeCommand(invoker, response.options); + } catch (err) { + this.logger.error(`_executeCommand errored:\nCommand: ${invoker.command.name}\nOptions:\n${Object.keys(response.options).map((key) => `[${key}: ${response.options[key]._rawValue}]`).join('\n')}\n${err.stack}`); + } }