Attachment

data class Attachment(val data: AttachmentData, val kord: Kord) : KordEntity(source)

An instance of a Discord Attachment.

A file attached to a Message.

Constructors

Link copied to clipboard
constructor(data: AttachmentData, kord: Kord)

Properties

Link copied to clipboard

The attachment's media type.

Link copied to clipboard
Link copied to clipboard

The description for the file.

Link copied to clipboard

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

Link copied to clipboard

The name of the file.

Link copied to clipboard

The AttachmentFlags of this attachment.

Link copied to clipboard
val height: Int?

The height of the file, if it is an image.

Link copied to clipboard
open override val id: Snowflake

The unique identifier of this entity.

Link copied to clipboard

Whether this attachment is ephemeral.

Link copied to clipboard

If this file is an image. Denoted by the presence of a width and height.

Link copied to clipboard

If this file is displayed as a spoiler. Denoted by the SPOILER_ prefix in the name.

Link copied to clipboard
open override val kord: Kord

The kord instance that created this object.

Link copied to clipboard

The proxied url of the file.

Link copied to clipboard
val size: Int

The size of the file in bytes.

Link copied to clipboard
val url: String

The url of the file.

Link copied to clipboard

A sampled waveform (currently for voice messages).

Link copied to clipboard
val width: Int?

The width of the file, if it is an image.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Entity): Int

Compares entities on id.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String