Added a nice comment explaining the sync call inside async function
This commit is contained in:
parent
c54586940e
commit
7b64f6938b
@ -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}"))
|
json_write(users, Path(f"tmp/{uuid}"))
|
||||||
|
|
||||||
await ctx.respond(file=File(Path(f"tmp/{uuid}"), filename="users.json"))
|
await ctx.respond(file=File(Path(f"tmp/{uuid}"), filename="users.json"))
|
||||||
|
Loading…
Reference in New Issue
Block a user