mirror of
https://github.com/danbulant/discord.js
synced 2026-05-29 20:30:38 +00:00
feat(Guild): default iconURL to gif if animated (#3338)
* feat(Guild): default iconURL to gif if animated * Icon, not Banner * fix url
This commit is contained in:
parent
f82f0af928
commit
1bec28bd81
1 changed files with 4 additions and 2 deletions
|
|
@ -133,8 +133,10 @@ exports.Endpoints = {
|
|||
},
|
||||
Banner: (guildID, hash, format = 'webp', size) =>
|
||||
makeImageUrl(`${root}/banners/${guildID}/${hash}`, { format, size }),
|
||||
Icon: (guildID, hash, format = 'webp', size) =>
|
||||
makeImageUrl(`${root}/icons/${guildID}/${hash}`, { format, size }),
|
||||
Icon: (guildID, hash, format = 'default', size) => {
|
||||
if (format === 'default') format = hash.startsWith('a_') ? 'gif' : 'webp';
|
||||
return makeImageUrl(`${root}/icons/${guildID}/${hash}`, { format, size });
|
||||
},
|
||||
AppIcon: (clientID, hash, { format = 'webp', size } = {}) =>
|
||||
makeImageUrl(`${root}/app-icons/${clientID}/${hash}`, { size, format }),
|
||||
AppAsset: (clientID, hash, { format = 'webp', size } = {}) =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue