defaultAvatar abstract method

String defaultAvatar(
  1. int discriminator,
  2. int id
)

Returns URL to /embed/avatars/{index}.

For non-migrated users to the new username system, the discriminator is passed as modulo 5 (% 5); and will lead to 0,1,2,3,4. (There's 5, but 5 modulo 5 will never give 5). For migrated users, the id is passed and is left shifted by 22 bits and then the result is modulo 6 (% 6). (For pink avatar).

E.g:

client.cdnHttpEndpoints.defaultAvatar(6712, 123456789123456789); // https://cdn.discordapp.com/embed/avatars/2.png

Implementation

String defaultAvatar(int discriminator, int id);