mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix(AllowedImageSizes): add new image sizes (#6844)
This commit is contained in:
@@ -16,7 +16,7 @@ exports.WSCodes = {
|
||||
|
||||
const AllowedImageFormats = ['webp', 'png', 'jpg', 'jpeg', 'gif'];
|
||||
|
||||
const AllowedImageSizes = [16, 32, 64, 128, 256, 300, 512, 600, 1024, 2048, 4096];
|
||||
const AllowedImageSizes = [16, 32, 56, 64, 96, 128, 256, 300, 512, 600, 1024, 2048, 4096];
|
||||
|
||||
function makeImageUrl(root, { format = 'webp', size } = {}) {
|
||||
if (!['undefined', 'number'].includes(typeof size)) throw new TypeError('INVALID_TYPE', 'size', 'number');
|
||||
@@ -35,7 +35,8 @@ function makeImageUrl(root, { format = 'webp', size } = {}) {
|
||||
* Options for static Image URLs.
|
||||
* @typedef {Object} StaticImageURLOptions
|
||||
* @property {string} [format='webp'] One of `webp`, `png`, `jpg`, `jpeg`.
|
||||
* @property {number} [size] One of `16`, `32`, `64`, `128`, `256`, `300`, `512`, `600`, `1024`, `2048`, `4096`
|
||||
* @property {number} [size] One of `16`, `32`, `56`, `64`, `96`, `128`, `256`, `300`, `512`, `600`, `1024`, `2048`,
|
||||
* `4096`
|
||||
*/
|
||||
|
||||
// https://discord.com/developers/docs/reference#image-formatting-cdn-endpoints
|
||||
|
||||
Reference in New Issue
Block a user