feat: add supported 4096 image size and jpeg format (#4031)

* add 4096 avatar size that discord supports

* jpeg is also a thing

* update jsdocs

* update typings and remove duplicate type
This commit is contained in:
Roki
2020-04-12 22:20:31 +02:00
committed by GitHub
parent 9ba4eff279
commit 1330e2d246
2 changed files with 7 additions and 9 deletions

8
typings/index.d.ts vendored
View File

@@ -269,7 +269,7 @@ declare module 'discord.js' {
public once(event: 'end', listener: (collected: Collection<K, V>, reason: string) => void): this;
}
type AllowedImageFormat = 'webp' | 'png' | 'jpg' | 'gif';
type AllowedImageFormat = 'webp' | 'png' | 'jpg' | 'jpeg' | 'gif';
export const Constants: {
Package: {
@@ -2542,12 +2542,10 @@ declare module 'discord.js' {
invite?: string;
}
type ImageExt = 'webp' | 'png' | 'jpg' | 'gif';
type ImageSize = 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048;
type ImageSize = 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
interface ImageURLOptions {
format?: ImageExt;
format?: AllowedImageFormat;
size?: ImageSize;
}