mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat(User): banners and accent colors (#6117)
* feat(User): support banners don't mind it for now, just trying * feat(User): support banners * fix(Constants): declare dynamic * fix(User): eslint * typings: update User typings * fix(User): add banner to equals and json bannerURL * typings: missing dynamic * refactor: xID to xId * types: re-add typings * feat: add banner color and fetch note * feat: switch to accent color (swap hex and dec)) * Update src/structures/User.js Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> * Update typings/index.d.ts Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Koyamie <koyamie1@gmail.com> Co-authored-by: Noel <icrawltogo@gmail.com> Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
This commit is contained in:
@@ -49,8 +49,10 @@ exports.Endpoints = {
|
||||
if (dynamic) format = hash.startsWith('a_') ? 'gif' : format;
|
||||
return makeImageUrl(`${root}/avatars/${userId}/${hash}`, { format, size });
|
||||
},
|
||||
Banner: (guildId, hash, format = 'webp', size) =>
|
||||
makeImageUrl(`${root}/banners/${guildId}/${hash}`, { format, size }),
|
||||
Banner: (id, hash, format = 'webp', size, dynamic = false) => {
|
||||
if (dynamic) format = hash.startsWith('a_') ? 'gif' : format;
|
||||
return makeImageUrl(`${root}/banners/${id}/${hash}`, { format, size });
|
||||
},
|
||||
Icon: (guildId, hash, format = 'webp', size, dynamic = false) => {
|
||||
if (dynamic) format = hash.startsWith('a_') ? 'gif' : format;
|
||||
return makeImageUrl(`${root}/icons/${guildId}/${hash}`, { format, size });
|
||||
|
||||
Reference in New Issue
Block a user