Skip to main content
Version: 0.38.47

APIAttachment

Index

Properties

optionalapplication

application?: null | APIApplication

For Clips, the application in the stream, if recognized

optionalclip_created_at

clip_created_at?: string

For Clips, when the clip was created

optionalclip_participants

clip_participants?: APIUser[]

For Clips, array of users who were in the stream

optionalcontent_type

content_type?: string

The attachment's media type

@see

optionaldescription

description?: string

Description (alt text) for the file (max 1024 characters)

optionalduration_secs

duration_secs?: number

The duration of the audio file (currently for voice messages)

optionalephemeral

ephemeral?: boolean

Whether this attachment is ephemeral

@remarks

Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.

filename

filename: string

Name of file attached

optionalflags

Attachment flags combined as a bitfield

optionalheight

height?: null | number

Height of file (if image or video)

id

id: string

Attachment id

optionalplaceholder

placeholder?: string

ThumbHash placeholder (if image or video)

@see

optionalplaceholder_version

placeholder_version?: number

Version of the placeholder (if image or video)

proxy_url

proxy_url: string

A proxied url of file

size

size: number

Size of file in bytes

optionaltitle

title?: string

The original filename of the upload with special characters preserved

This will be present when the filename contains special characters (e.g. Cyrillic), in which case the filename field will be a sanitized version without those characters

url

url: string

Source url of file

optionalwaveform

waveform?: string

Base64 encoded bytearray representing a sampled waveform (currently for voice messages)

optionalwidth

width?: null | number

Width of file (if image or video)