Attachment

interface Attachment

A file attached to a message. Read-only metadata describing an attachment that already exists on Discord. For uploading new files use AttachmentInput instead.

exported from lib.weeble.d

Properties

Property

Type

Description

contentType

string | null

MIME type of the file, or null when unknown.

description

string | null

Alternative text shown for this attachment, or null when unset.

ephemeral

boolean

Indicates whether this attachment is ephemeral (only visible to the interaction user).

filename

string

File name as uploaded.

flags

number

Discord attachment flag bitfield.

height

number | null

Height of the image in pixels, or null for non-image attachments.

id

string

The unique ID for this attachment.

isSpoiler

boolean

Whether Discord marks this attachment as a spoiler.

proxyUrl

string

Proxied CDN URL for the attachment.

size

number

Size of the file in bytes.

url

string

CDN URL for the attachment.

width

number | null

Width of the image in pixels, or null for non-image attachments.