Compare commits

..

2 commits

Author SHA1 Message Date
Ethan Lane 6cf5a59074 Update gdrivesync command to fail upon json error
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-17 18:28:45 +00:00
Ethan Lane b8754ade41 Update .env version 2024-01-17 18:23:39 +00:00
4 changed files with 13 additions and 7 deletions

View file

@ -7,7 +7,7 @@
# any secret values.
BOT_TOKEN=
BOT_VER=0.4.0
BOT_VER=0.5.0
BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816
BOT_CLIENTID=682942374040961060

View file

@ -7,7 +7,7 @@
# any secret values.
BOT_TOKEN=
BOT_VER=0.4.0
BOT_VER=0.5.0
BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816
BOT_CLIENTID=1093810443589529631

View file

@ -7,7 +7,7 @@
# any secret values.
BOT_TOKEN=
BOT_VER=0.4.0
BOT_VER=0.5.0
BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816
BOT_CLIENTID=1147976642942214235

View file

@ -34,12 +34,18 @@ export default class Gdrivesync extends Command {
await interaction.editReply(`Error while running sync command. Safe Mode has been activated. Code: ${error.code}`);
await Config.SetValue("safemode", "true");
} else {
await CardMetadataFunction.Execute();
const result = await CardMetadataFunction.Execute();
await interaction.editReply("Synced successfully.");
if (result) {
await interaction.editReply("Synced successfully.");
CoreClient.AllowDrops = true;
await Config.SetValue("safemode", "false");
CoreClient.AllowDrops = true;
await Config.SetValue("safemode", "false");
} else {
const safemode = await Config.GetValue("safemode");
await interaction.editReply(`Sync failed. ${safemode == "true" ? "(Safe Mode is on)": "(Safe Mode is off)"}`);
}
}
});
}