From b55e3da63e8e41bd29ea645b49dc58e254635a2e Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 14 Dec 2023 20:32:46 -0500 Subject: [PATCH] fix(moderation): fixed cases sometimes not exporting as files --- moderation/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 2d4c06a..5fce42c 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -1151,7 +1151,7 @@ class Moderation(commands.Cog): case_dict = await self.fetch_case(case, interaction.guild.id) if case_dict: if export: - if len(str(case)) > 1800 or export == 'file': + if export == 'file' or len(str(case)) > 1800: filename = str(data_manager.cog_data_path(cog_instance=self)) + str(os.sep) + f"moderation_{interaction.guild.id}_case_{case}.json" with open(filename, "w", encoding="utf-8") as f: