Reputation: 83
I am setting up a discord game which uses folders as profiles, how do I fix the problem that if someone changes their username the bot can no longer access their profile?
Upvotes: 0
Views: 102
Reputation: 1427
Usernames can be changed however User ID's cannot so you should use those instead, here's an example:
@client.command()
async def getUserID(ctx):
userID = ctx.author.id
await ctx.send(f"Your User ID is {userID}")
Upvotes: 0
Reputation: 11
Use the UserID instead of the Username.
This never changes unless they change to a different account, so you won’t have to worry about usernames changing.
Upvotes: 1