Updated username to replace discriminator with a username for data export

This commit is contained in:
Profitroll 2025-02-09 20:57:22 +01:00
parent d402c520a5
commit 226721bb62
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -90,13 +90,14 @@ class Data(commands.Cog):
{
"id": member.id,
"nick": member.nick,
"username": f"{member.name}#{member.discriminator}",
"username": f"{member.name}",
"bot": member.bot,
}
)
# Temporary file must be written synchronously,
# otherwise it will not be there when ctx.respond() is be called
# TODO Find a way to give this file to Pycord without FS operations
json_write(users, Path(f"tmp/{uuid}"))
await ctx.respond(file=File(Path(f"tmp/{uuid}"), filename="users.json"))