fix(moderation): beautify export json
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 54s

This commit is contained in:
Seaswimmer 2023-12-13 15:46:28 -05:00
parent 781b283135
commit b7193ae2bf
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -749,7 +749,7 @@ class Moderation(commands.Cog):
try:
filename = str(data_manager.cog_data_path(cog_instance=self)) + str(os.sep) + f"moderation_{interaction.guild.id}.json"
with open(filename, "w") as f:
json.dump(result_dict_list, f)
json.dump(result_dict_list, f, indent=2)
await interaction.followup.send(file=discord.File(filename, f"moderation_{interaction.guild.id}.json"), ephemeral=ephemeral)
os.remove(filename)
return