diff --git a/src/api/CDN.ts b/src/api/CDN.ts index af5b2ea..63dd4a7 100644 --- a/src/api/CDN.ts +++ b/src/api/CDN.ts @@ -48,7 +48,7 @@ export interface MakeURLOptions { * * @defaultValue `'webp'` */ - extension?: string | undefined; + extension?: ImageExtension | StickerExtension | undefined; /** * The size specified in the image URL */ @@ -306,9 +306,6 @@ export class CDN { route: string, { allowedExtensions = ALLOWED_EXTENSIONS, extension = 'webp', size }: Readonly = {}, ): string { - // eslint-disable-next-line no-param-reassign - extension = String(extension).toLowerCase(); - if (!allowedExtensions.includes(extension)) { throw new RangeError(`Invalid extension provided: ${extension}\nMust be one of: ${allowedExtensions.join(', ')}`); }