make default avatar resolving better (#1484)

* Update Constants.js

* Update User.js

* Update Constants.js

* Update Constants.js
This commit is contained in:
Gus Caplan
2017-05-13 10:41:32 -05:00
committed by Crawl
parent ff3e602134
commit 6ac2252794
2 changed files with 2 additions and 11 deletions

View File

@@ -124,9 +124,7 @@ class User {
* @readonly
*/
get defaultAvatarURL() {
const avatars = Object.keys(Constants.DefaultAvatars);
const avatar = avatars[this.discriminator % avatars.length];
return Constants.Endpoints.CDN(this.client.options.http.host).Asset(`${Constants.DefaultAvatars[avatar]}.png`);
return Constants.Endpoints.CDN(this.client.options.http.host).DefaultAvatar(this.discriminator % 5);
}
/**