fix(bot,types,utils)!: change avatar decoration url link (#3621)

* Change the avatarDecorationUrl link

* Add User#avatarDecorationData & Member#avatarDecorationData

* Fix type error

* Fix format error

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
Fleny
2024-05-26 19:14:11 +00:00
committed by GitHub
co-authored by Awesome Stickz
parent 226e3de43e
commit 5290078044
8 changed files with 70 additions and 11 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ export function avatarUrl(
: `https://cdn.discordapp.com/embed/avatars/${discriminator === '0' ? (BigInt(userId) >> BigInt(22)) % BigInt(6) : Number(discriminator) % 5}.png`
}
export function avatarDecorationUrl(userId: BigString, avatarDecoration: BigString): string {
return `https://cdn.discordapp.com/avatar-decorations/${userId}/${
export function avatarDecorationUrl(avatarDecoration: BigString): string {
return `https://cdn.discordapp.com/avatar-decoration-presets/${
typeof avatarDecoration === 'string' ? avatarDecoration : iconBigintToHash(avatarDecoration)
}.png`
}