feat(MessageAttachment): support for #contentType (#5481)

Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
This commit is contained in:
monbrey
2021-04-15 08:38:45 +10:00
committed by GitHub
parent 164ddf668f
commit 7b161f93a0
2 changed files with 7 additions and 0 deletions

View File

@@ -79,6 +79,12 @@ class MessageAttachment {
* @type {?number}
*/
this.width = typeof data.width !== 'undefined' ? data.width : null;
/**
* This media type of this attachment
* @type {?string}
*/
this.contentType = data.content_type ?? null;
}
/**

1
typings/index.d.ts vendored
View File

@@ -1061,6 +1061,7 @@ declare module 'discord.js' {
constructor(attachment: BufferResolvable | Stream, name?: string, data?: object);
public attachment: BufferResolvable | Stream;
public contentType: string | null;
public height: number | null;
public id: Snowflake;
public name: string | null;