mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
fix config not saving
This commit is contained in:
parent
62e8c7a244
commit
511976a239
3 changed files with 8 additions and 4 deletions
|
@ -194,6 +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);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -206,6 +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);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -224,6 +226,7 @@ async function changeSetting(interaction, setting, state, channel) {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
data.plugins[setting] = null;
|
data.plugins[setting] = null;
|
||||||
|
|
||||||
|
data.markModified(setting);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -234,6 +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);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
|
|
@ -103,7 +103,7 @@ class Goodbye extends BaseCommand {
|
||||||
withImage: null,
|
withImage: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
await guildData.markModified("plugins.goodbye");
|
guildData.markModified("plugins.goodbye");
|
||||||
await guildData.save();
|
await guildData.save();
|
||||||
|
|
||||||
interaction.success("administration/goodbye:DISABLED", null, { edit: true });
|
interaction.success("administration/goodbye:DISABLED", null, { edit: true });
|
||||||
|
@ -119,7 +119,7 @@ class Goodbye extends BaseCommand {
|
||||||
withImage: image,
|
withImage: image,
|
||||||
};
|
};
|
||||||
|
|
||||||
await guildData.markModified("plugins.goodbye");
|
guildData.markModified("plugins.goodbye");
|
||||||
await guildData.save();
|
await guildData.save();
|
||||||
|
|
||||||
interaction.success("administration/goodbye:ENABLED", {
|
interaction.success("administration/goodbye:ENABLED", {
|
||||||
|
|
|
@ -103,7 +103,7 @@ class Welcome extends BaseCommand {
|
||||||
withImage: null,
|
withImage: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
await guildData.markModified("plugins.welcome");
|
guildData.markModified("plugins.welcome");
|
||||||
await guildData.save();
|
await guildData.save();
|
||||||
|
|
||||||
interaction.success("administration/welcome:DISABLED", null);
|
interaction.success("administration/welcome:DISABLED", null);
|
||||||
|
@ -119,7 +119,7 @@ class Welcome extends BaseCommand {
|
||||||
withImage: image,
|
withImage: image,
|
||||||
};
|
};
|
||||||
|
|
||||||
await guildData.markModified("plugins.welcome");
|
guildData.markModified("plugins.welcome");
|
||||||
await guildData.save();
|
await guildData.save();
|
||||||
|
|
||||||
interaction.success("administration/welcome:ENABLED", {
|
interaction.success("administration/welcome:ENABLED", {
|
||||||
|
|
Loading…
Reference in a new issue