mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 19:20:42 +00:00
Webpack build for branch master: 71f2cc10f1
This commit is contained in:
parent
43001db966
commit
f238f4eff5
2 changed files with 8 additions and 2 deletions
|
|
@ -164,7 +164,13 @@ const AllowedImageFormats = [
|
||||||
'gif',
|
'gif',
|
||||||
];
|
];
|
||||||
|
|
||||||
const AllowedImageSizes = Array.from({ length: 8 }, (e, i) => 2 ** (i + 4));
|
const AllowedImageSizes = [
|
||||||
|
128,
|
||||||
|
256,
|
||||||
|
512,
|
||||||
|
1024,
|
||||||
|
2048,
|
||||||
|
];
|
||||||
|
|
||||||
function makeImageUrl(root, { format = 'webp', size } = {}) {
|
function makeImageUrl(root, { format = 'webp', size } = {}) {
|
||||||
if (format && !AllowedImageFormats.includes(format)) throw new Error('IMAGE_FORMAT', format);
|
if (format && !AllowedImageFormats.includes(format)) throw new Error('IMAGE_FORMAT', format);
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue