Creates a new Attachment instance.
The client instance.
The raw data for the attachment from the API.
Optional
deleted?: null | booleanOptional
message_id?: null | stringOptional
object_id?: null | stringOptional
reported?: null | booleanOptional
server_id?: null | stringFormat: int
Optional
user_id?: null | stringReadonly
clientThe client instance.
The filename of the attachment.
The unique identifier for the object.
Metadata associated with the attachment (e.g., dimensions for images).
Format: uint
Format: uint
Format: uint
Format: uint
The size of the attachment in bytes.
The MIME type of the attachment (e.g., image/png
, application/pdf
).
Creates a deep clone of the object.
A clone of the object.
Updates the object with new data and returns a clone of the object.
The data to update the object with.
Optional
clear: string[]Fields to clear in the object.
A clone of the updated object.
Compares this object with another to determine if they are equal.
Optional
obj: null | AttachmentThe object to compare with.
true
if the objects are equal, otherwise false
.
Represents an attachment, such as a file or image, in a message or channel.