fix(moderation): fixed discord.File
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 51s
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 51s
This commit is contained in:
parent
b7200210ba
commit
781b283135
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
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:
|
with open(filename, "w") as f:
|
||||||
json.dump(result_dict_list, f)
|
json.dump(result_dict_list, f)
|
||||||
await interaction.followup.send(file=discord.File(filename=filename), ephemeral=ephemeral)
|
await interaction.followup.send(file=discord.File(filename, f"moderation_{interaction.guild.id}.json"), ephemeral=ephemeral)
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
return
|
return
|
||||||
except json.JSONDecodeError as e:
|
except json.JSONDecodeError as e:
|
||||||
|
|
Loading…
Reference in a new issue