Added a nice comment explaining the sync call inside async function

This commit is contained in:
Profitroll 2024-12-26 20:28:44 +01:00
parent c54586940e
commit 7b64f6938b
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -92,6 +92,8 @@ class Data(commands.Cog):
}
)
# Temporary file must be written synchronously,
# otherwise it will not be there when ctx.respond() is be called
json_write(users, Path(f"tmp/{uuid}"))
await ctx.respond(file=File(Path(f"tmp/{uuid}"), filename="users.json"))