From 9a335aa3e2f64009f11098a198d5a823ed72a5e9 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sat, 13 Jul 2024 15:05:59 +0500 Subject: [PATCH] fix for real --- commands/Administration/config.js | 8 ++++---- events/CommandHandler.js | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/commands/Administration/config.js b/commands/Administration/config.js index 96b3c9d6..3b88b312 100644 --- a/commands/Administration/config.js +++ b/commands/Administration/config.js @@ -194,7 +194,7 @@ async function changeSetting(interaction, setting, state, channel) { if (!state) { data.plugins[settingSplitted[0]][settingSplitted[1]] = null; - data.markModified(setting); + data.markModified(`plugins.${setting}`); await data.save(); return interaction.reply({ @@ -207,7 +207,7 @@ async function changeSetting(interaction, setting, state, channel) { if (channel) { data.plugins[settingSplitted[0]][settingSplitted[1]] = channel.id; - data.markModified(setting); + data.markModified(`plugins.${setting}`); await data.save(); return interaction.reply({ @@ -226,7 +226,7 @@ async function changeSetting(interaction, setting, state, channel) { if (!state) { data.plugins[setting] = null; - data.markModified(setting); + data.markModified(`plugins.${setting}`); await data.save(); return interaction.reply({ @@ -237,7 +237,7 @@ async function changeSetting(interaction, setting, state, channel) { if (channel) { data.plugins[setting] = channel.id; - data.markModified(setting); + data.markModified(`plugins.${setting}`); await data.save(); return interaction.reply({ diff --git a/events/CommandHandler.js b/events/CommandHandler.js index 5fff0964..fa6384b4 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -60,10 +60,11 @@ class CommandHandler extends BaseEvent { client.logger.cmd( `[${interaction.guild ? interaction.guild.name : "DM"}]: [${interaction.user.getUsername()}] => /${command.command.name}${ interaction.options.data.length > 0 - ? ", args: " + interaction.options.data + ? `, args: [${interaction.options.data .map(arg => { return `${arg.name}: ${arg.value}`; - }).join(", ") + }) + .join(", ")}]` : "" }`, );