mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Fix User#defaultAvatarURL in Node 6
This commit is contained in:
@@ -111,9 +111,9 @@ class User {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get defaultAvatarURL() {
|
get defaultAvatarURL() {
|
||||||
let defaultAvatars = Object.values(Constants.DefaultAvatars);
|
const avatars = Object.keys(Constants.DefaultAvatars);
|
||||||
let defaultAvatar = this.discriminator % defaultAvatars.length;
|
const avatar = avatars[this.discriminator % avatars.length];
|
||||||
return Constants.Endpoints.assets(`${defaultAvatars[defaultAvatar]}.png`);
|
return Constants.Endpoints.assets(`${Constants.DefaultAvatars[avatar]}.png`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user