mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 05:22:15 +00:00
Fix User#avatarURL for Nitro animated avatars (#1012)
* fix avatar url * switch to cdn
This commit is contained in:
parent
f726db2152
commit
2390e525ef
1 changed files with 4 additions and 1 deletions
|
|
@ -90,7 +90,10 @@ const Endpoints = exports.Endpoints = {
|
|||
user: (userID) => `${API}/users/${userID}`,
|
||||
userChannels: (userID) => `${Endpoints.user(userID)}/channels`,
|
||||
userProfile: (userID) => `${Endpoints.user(userID)}/profile`,
|
||||
avatar: (userID, avatar) => userID === '1' ? avatar : `${Endpoints.user(userID)}/avatars/${avatar}.jpg`,
|
||||
avatar: (userID, avatar) => {
|
||||
if (userID === '1') return avatar;
|
||||
return `${Endpoints.CDN}/avatars/${userID}/${avatar}.${avatar.startsWith('a_') ? 'gif' : 'jpg'}`;
|
||||
},
|
||||
me: `${API}/users/@me`,
|
||||
meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`,
|
||||
meMentions: (limit, roles, everyone, guildID) =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue