mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
refactor(CDN)!: Use an object for the constructor (#10978)
BREAKING CHANGE: The CDN class requires an object to construct.
This commit is contained in:
@@ -8,7 +8,7 @@ const hash = 'abcdef';
|
||||
const animatedHash = 'a_bcdef';
|
||||
const defaultAvatar = 1_234 % 5;
|
||||
|
||||
const cdn = new CDN(baseCDN, baseMedia);
|
||||
const cdn = new CDN({ cdn: baseCDN, mediaProxy: baseMedia });
|
||||
|
||||
test('appAsset default', () => {
|
||||
expect(cdn.appAsset(id, hash)).toEqual(`${baseCDN}/app-assets/${id}/${hash}.webp`);
|
||||
|
||||
Reference in New Issue
Block a user