From dc176fca5068623eb32ed4572e2d3416f0dd1b42 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 18 Jul 2022 02:10:29 +0300 Subject: [PATCH] lang & debug stuff --- src/localization/en_gb/settings/en_gb_administration.lang | 5 ++++- src/structure/components/observers/CommandHandler.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/localization/en_gb/settings/en_gb_administration.lang b/src/localization/en_gb/settings/en_gb_administration.lang index dba3a51..83bd69a 100644 --- a/src/localization/en_gb/settings/en_gb_administration.lang +++ b/src/localization/en_gb/settings/en_gb_administration.lang @@ -25,4 +25,7 @@ __Protection Types__ Manage which commands are enabled within your server. [SETTING_COMMANDS_NONE] -No commands are disabled. \ No newline at end of file +No commands are disabled. + +[C_DISABLE_WARNING] +You disabled a command inside of the **Administration** module. It is dangerous to do so, as it may disable configurability of your server. Note you are unable to disable the `command:enable` and `command:disable` commands. \ No newline at end of file diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index 831d363..ea7310b 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -145,7 +145,10 @@ class CommandHandler extends Observer { }); try { - this.logger.info(`${invoker.user.tag} (${invoker.user.id}) is executing ${invoker.command.name} in ${invoker.guild?.name || 'dms'}`); + let debugstr = invoker.command.name; + if (invoker.subcommandGroup) debugstr += ` ${invoker.subcommandGroup.name}`; + if(invoker.subcommand) debugstr += ` ${invoker.subcommand.name}`; + this.logger.info(`${invoker.user.tag} (${invoker.user.id}) is executing ${debugstr} in ${invoker.guild?.name || 'dms'}`); response = await invoker.command.execute(invoker, options); invoker.command.success(now); } catch (error) {