Search code examples
pythondiscorddiscord.pybots

New Discord Username System


so currently i have this python bot that when a user tries to store something the author name along with the discriminator('#') is stored as well

return "**Hello** **" + message.author.name + "#" + message.author.discriminator + "** ** :wave: "

so my question is when they remove the discriminator and apply the new username system, how can i change that in my bot that it stores the username? also am i going to need to upgrade my discord python package and will they add something like this? message.author.username because when i currently try to call message.author.username i get this

'User' object has no attribute 'username`

Solution

  • The Discord.py package will be updated sometime after discord applies the username system.

    For now, you can't use the new system as the developers of Discord.py need to see how the new system works before they implement changes.

    As for your question:

    You will have to update the Discord.py package when an update eventually comes out, otherwise you will not be able to use the updated methods. We also don't know how storing the username will be executed, but message.author.username seems like a good guess of what the method will be like