mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
feat: Support animated WebP (#10987)
* feat: Support animated WebP (#10911) * feat: support animated WebP * refactor: change the rest * fix: remove redundant code * fix(CDN): Export `MakeURLOptions`
This commit is contained in:
@@ -54,7 +54,7 @@ test('discoverySplash default', () => {
|
||||
expect(cdn.discoverySplash(id, hash)).toEqual(`${baseCDN}/discovery-splashes/${id}/${hash}.webp`);
|
||||
});
|
||||
|
||||
test('emoji default', () => {
|
||||
test('emoji', () => {
|
||||
expect(cdn.emoji(id)).toEqual(`${baseCDN}/emojis/${id}.webp`);
|
||||
});
|
||||
|
||||
@@ -62,6 +62,14 @@ test('emoji gif', () => {
|
||||
expect(cdn.emoji(id, 'gif')).toEqual(`${baseCDN}/emojis/${id}.gif`);
|
||||
});
|
||||
|
||||
test('emoji animated', () => {
|
||||
expect(cdn.emoji(id, { animated: true })).toEqual(`${baseCDN}/emojis/${id}.webp?animated=true`);
|
||||
});
|
||||
|
||||
test('emoji with GIF format', () => {
|
||||
expect(cdn.emoji(id, { extension: 'gif' })).toEqual(`${baseCDN}/emojis/${id}.gif`);
|
||||
});
|
||||
|
||||
test('guildMemberAvatar default', () => {
|
||||
expect(cdn.guildMemberAvatar(id, id, hash)).toEqual(`${baseCDN}/guilds/${id}/users/${id}/avatars/${hash}.webp`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user