Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/rest/__tests__/CDN.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ test('banner default', () => {
expect(cdn.banner(id, hash)).toBe(`${base}/banners/${id}/${hash}.png`);
});

test('banner dynamic-animated', () => {
expect(cdn.banner(id, animatedHash, { dynamic: true })).toBe(`${base}/banners/${id}/${animatedHash}.gif`);
});

test('banner dynamic-not-animated', () => {
expect(cdn.banner(id, hash, { dynamic: true })).toBe(`${base}/banners/${id}/${hash}.png`);
});

test('channelIcon default', () => {
expect(cdn.channelIcon(id, hash)).toBe(`${base}/channel-icons/${id}/${hash}.png`);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/rest/src/lib/CDN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class CDN {

/**
* Generates a banner URL, e.g. for a user or a guild.
* @param id The id that has the banner splash
* @param id The id that has the banner
* @param bannerHash The hash provided by Discord for this banner
* @param options Optional options for the banner
*/
Expand Down