mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat(GuildMember): add guild avatars (#5696)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com> Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>
This commit is contained in:
@@ -49,6 +49,10 @@ exports.Endpoints = {
|
||||
if (dynamic && hash.startsWith('a_')) format = 'gif';
|
||||
return makeImageUrl(`${root}/avatars/${userId}/${hash}`, { format, size });
|
||||
},
|
||||
GuildMemberAvatar: (guildId, memberId, hash, format = 'webp', size, dynamic = false) => {
|
||||
if (dynamic && hash.startsWith('a_')) format = 'gif';
|
||||
return makeImageUrl(`${root}/guilds/${guildId}/users/${memberId}/avatars/${hash}`, { format, size });
|
||||
},
|
||||
Banner: (id, hash, format, size, dynamic = false) => {
|
||||
if (dynamic && hash.startsWith('a_')) format = 'gif';
|
||||
return makeImageUrl(`${root}/banners/${id}/${hash}`, { format, size });
|
||||
|
||||
Reference in New Issue
Block a user