Attachment
Documentation / @discordeno/bot / Attachment
Interface: Attachment
Defined in: transformers/types.ts:325
Properties
application?
optionalapplication?:Application
Defined in: transformers/types.ts:373
for Clips, the application in the stream, if recognized
clipCreatedAt?
optionalclipCreatedAt?:string
Defined in: transformers/types.ts:371
for Clips, when the clip was created. ISO8601 timestamp
clipParticipants?
optionalclipParticipants?:User[]
Defined in: transformers/types.ts:369
for Clips, array of users who were in the stream
contentType?
optionalcontentType?:string
Defined in: transformers/types.ts:331
The attachment's media type
description?
optionaldescription?:string
Defined in: transformers/types.ts:346
description for the file (max 1024 characters)
duration_secs?
optionalduration_secs?:number
Defined in: transformers/types.ts:363
The duration of the audio file for a voice message
ephemeral?
optionalephemeral?:boolean
Defined in: transformers/types.ts:361
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
Defined in: transformers/types.ts:327
Name of file attached
flags?
optionalflags?:AttachmentFlags
Defined in: transformers/types.ts:367
Attachment flags combined as a bitfield
height?
optionalheight?:number
Defined in: transformers/types.ts:348
Height of file (if image or video)
id
id:
bigint
Defined in: transformers/types.ts:344
Attachment id
placeholder?
optionalplaceholder?:string
Defined in: transformers/types.ts:352
Thumbhash placeholder (if image or video)
placeholderVersion?
optionalplaceholderVersion?:number
Defined in: transformers/types.ts:354
Version of the placeholder (if image or video)
proxyUrl
proxyUrl:
string
Defined in: transformers/types.ts:342
A proxied url of file
Remarks
The proxy url supports images and videos (which have a defined width and height) as well as audio files, which are passed through unmodified. For all other attachment types, the proxy returns a 415: Unsupported Media Type error.
size
size:
number
Defined in: transformers/types.ts:333
Size of file in bytes
title?
optionaltitle?:string
Defined in: transformers/types.ts:329
The title of the file
url
url:
string
Defined in: transformers/types.ts:335
Source url of file
waveform?
optionalwaveform?:string
Defined in: transformers/types.ts:365
A base64 encoded bytearray representing a sampled waveform for a voice message
width?
optionalwidth?:number
Defined in: transformers/types.ts:350
Width of file (if image or video)