mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 21:12:06 +00:00
update image sizes, adding some more (#1781)
This commit is contained in:
parent
71f2cc10f1
commit
6065fe1f8c
1 changed files with 1 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue