Class Attachment

Represents a file attachment.

Hierarchy

Constructors

Properties

contentType?: string

The mime type of this attachment.

description?: string

The description of this attachment.

durationSecs?: number

The duration of the attached audio file, if voice message.

ephemeral?: boolean

If this attachment is ephemeral. Ephemeral attachments will be removed after a set period of time.

filename: string

The filename of this attachment.

height?: number

The height of this attachment, if an image.

id: string
proxyURL: string

A proxied url of this attachment.

size: number

The size of this attachment.

url: string

The source url of this attachment.

waveform?: null | string

Base64 encoded bytearray representing a sampled waveform for voice messages.

width?: number

The width of this attachment, if an image.

Accessors

  • get createdAt(): Date
  • Returns Date

Methods

  • Returns string

  • Parameters

    • data: unknown

    Returns void

  • Parameters

    • Optional timestamp: number | Date

    Returns string

  • Parameters

    • id: string

    Returns Date

  • Parameters

    • id: string

    Returns number

Generated using TypeDoc