fix(moderation): fixed filename in discord upload function
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 53s

This commit is contained in:
Seaswimmer 2023-12-13 15:43:23 -05:00
parent 9d73e46749
commit b7200210ba
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -750,7 +750,7 @@ class Moderation(commands.Cog):
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)
await interaction.followup.send(file=discord.File(f"moderation_{interaction.guild.id}.json"), ephemeral=ephemeral)
await interaction.followup.send(file=discord.File(filename=filename), ephemeral=ephemeral)
os.remove(filename)
return
except json.JSONDecodeError as e: