mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
update image sizes, adding some more (#1781)
This commit is contained in:
@@ -95,13 +95,7 @@ const AllowedImageFormats = [
|
||||
'gif',
|
||||
];
|
||||
|
||||
const AllowedImageSizes = [
|
||||
128,
|
||||
256,
|
||||
512,
|
||||
1024,
|
||||
2048,
|
||||
];
|
||||
const AllowedImageSizes = Array.from({ length: 8 }, (e, i) => 2 ** (i + 4));
|
||||
|
||||
function makeImageUrl(root, { format = 'webp', size } = {}) {
|
||||
if (format && !AllowedImageFormats.includes(format)) throw new Error('IMAGE_FORMAT', format);
|
||||
|
||||
Reference in New Issue
Block a user