fix(moderation): fixed cases sometimes not exporting as files

This commit is contained in:
Seaswimmer 2023-12-14 20:32:46 -05:00
parent eed3ad1748
commit b55e3da63e
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -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: