feat(Attachment): add title (#10423)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Danial Raza
2024-08-19 17:30:47 +02:00
committed by GitHub
parent 2ca187bd34
commit c63bde9479
2 changed files with 12 additions and 0 deletions

View File

@@ -133,6 +133,17 @@ class Attachment {
} else {
this.flags ??= new AttachmentFlagsBitField().freeze();
}
if ('title' in data) {
/**
* The title of this attachment
* <info>This will only be available if the attachment name contains special characters.</info>
* @type {?string}
*/
this.title = data.title;
} else {
this.title ??= null;
}
}
/**

View File

@@ -2187,6 +2187,7 @@ export class Attachment {
public proxyURL: string;
public size: number;
public get spoiler(): boolean;
public title: string | null;
public url: string;
public waveform: string | null;
public width: number | null;