fix for real

This commit is contained in:
Jonny_Bro (Nikita) 2024-07-13 15:05:59 +05:00
parent 511976a239
commit 9a335aa3e2
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8
2 changed files with 7 additions and 6 deletions

View file

@ -194,7 +194,7 @@ async function changeSetting(interaction, setting, state, channel) {
if (!state) { if (!state) {
data.plugins[settingSplitted[0]][settingSplitted[1]] = null; data.plugins[settingSplitted[0]][settingSplitted[1]] = null;
data.markModified(setting); data.markModified(`plugins.${setting}`);
await data.save(); await data.save();
return interaction.reply({ return interaction.reply({
@ -207,7 +207,7 @@ async function changeSetting(interaction, setting, state, channel) {
if (channel) { if (channel) {
data.plugins[settingSplitted[0]][settingSplitted[1]] = channel.id; data.plugins[settingSplitted[0]][settingSplitted[1]] = channel.id;
data.markModified(setting); data.markModified(`plugins.${setting}`);
await data.save(); await data.save();
return interaction.reply({ return interaction.reply({
@ -226,7 +226,7 @@ async function changeSetting(interaction, setting, state, channel) {
if (!state) { if (!state) {
data.plugins[setting] = null; data.plugins[setting] = null;
data.markModified(setting); data.markModified(`plugins.${setting}`);
await data.save(); await data.save();
return interaction.reply({ return interaction.reply({
@ -237,7 +237,7 @@ async function changeSetting(interaction, setting, state, channel) {
if (channel) { if (channel) {
data.plugins[setting] = channel.id; data.plugins[setting] = channel.id;
data.markModified(setting); data.markModified(`plugins.${setting}`);
await data.save(); await data.save();
return interaction.reply({ return interaction.reply({

View file

@ -60,10 +60,11 @@ class CommandHandler extends BaseEvent {
client.logger.cmd( client.logger.cmd(
`[${interaction.guild ? interaction.guild.name : "DM"}]: [${interaction.user.getUsername()}] => /${command.command.name}${ `[${interaction.guild ? interaction.guild.name : "DM"}]: [${interaction.user.getUsername()}] => /${command.command.name}${
interaction.options.data.length > 0 interaction.options.data.length > 0
? ", args: " + interaction.options.data ? `, args: [${interaction.options.data
.map(arg => { .map(arg => {
return `${arg.name}: ${arg.value}`; return `${arg.name}: ${arg.value}`;
}).join(", ") })
.join(", ")}]`
: "" : ""
}`, }`,
); );