Interface

APIMessageAttachment

File attachment on a message.

Properties

content_hash?: string | null

Hash of attachment content for integrity checks.

content_type?: string | null

MIME type when known.

description?: string | null

Alt text / caption for accessibility.

duration?: number | null

Duration in seconds for audio/video.

expired?: boolean | null

Whether the attachment URL has expired.

expires_at?: string | null

ISO-8601 timestamp when the attachment URL expires.

filename: string

Original filename.

flags?: number | null

MessageAttachmentFlags bitfield (e.g. IS_SPOILER).

height?: number | null

Pixel height for images/videos.

Attachment ID (snowflake).

nsfw?: boolean | null

Whether the attachment is NSFW.

placeholder?: string | null

Base64 placeholder for lazy loading.

proxy_url?: string | null

CDN proxy URL.

size: number

File size in bytes.

title?: string | null

Display title (if different from filename).

url?: string | null

CDN URL to download the file.

waveform?: string | null

Base64 audio waveform for voice messages.

width?: number | null

Pixel width for images/videos.