This program allows you to find the default profile picture for a Discord user. It then allows you to view this image online, or display it in a little window.
These profile pictures are not just randomly assigned, as some may assume. They are actually worked out using a bit of mathematics. The method of working it out depends on whether you are using the current username format (the "Pomelo system") or legacy username format (with discriminators).
To work out the default profile picture for an account on the legacy username system (a user with a discriminator, such as #3729), Discord takes that discriminator modulo1 5. This number will be a number from 0–4, corresponding to a selection of four different profile pictures. These can be viewed at https://cdn.discordapp.com/embed/avatars/#.png
, replacing the #
with the final calculated number.
To work out the default profile picture for an account on the current system (a user with no discriminator, just a plain username), Discord takes the user's unique user ID, performs a 22 place binary shift on it, and takes that number modulo1 6. This number will be a number from 0–5, corresponding to a selection of five different profile pictures. These can be viewed at https://cdn.discordapp.com/embed/avatars/#.png
, replacing the #
with the final calculated number.