feat(utils): animated webp emojis (#4199)

This commit is contained in:
Fleny
2025-06-01 08:28:27 +02:00
committed by GitHub
parent b537c06a72
commit 90f0507af0
3 changed files with 15 additions and 3 deletions
+8
View File
@@ -43,6 +43,14 @@ describe('images.ts', () => {
it('can format emoji url with gif as ext', () => {
expect(emojiUrl('1079584570661404724', true)).to.equal('https://cdn.discordapp.com/emojis/1079584570661404724.gif')
})
it('can format emoji url with webp as ext', () => {
expect(emojiUrl('1079823706743918622', false, 'webp')).to.equal('https://cdn.discordapp.com/emojis/1079823706743918622.webp')
})
it('can format emoji url with webp as ext when animated', () => {
expect(emojiUrl('1079823706743918622', true, 'webp')).to.equal('https://cdn.discordapp.com/emojis/1079823706743918622.webp?animated=true')
})
})
describe('avatarUrl function', () => {