DiscordAttachment

data class DiscordAttachment(val id: Snowflake, val filename: String, val description: Optional<String> = Optional.Missing(), val contentType: Optional<String> = Optional.Missing(), val size: Int, val url: String, val proxyUrl: String, val height: OptionalInt? = OptionalInt.Missing, val width: OptionalInt? = OptionalInt.Missing, val ephemeral: OptionalBoolean = OptionalBoolean.Missing, val durationSecs: Optional<DurationInDoubleSeconds> = Optional.Missing(), val waveform: Optional<String> = Optional.Missing(), val flags: Optional<AttachmentFlags> = Optional.Missing())(source)

A representation of a Discord Attachment structure.

Constructors

Link copied to clipboard
constructor(id: Snowflake, filename: String, description: Optional<String> = Optional.Missing(), contentType: Optional<String> = Optional.Missing(), size: Int, url: String, proxyUrl: String, height: OptionalInt? = OptionalInt.Missing, width: OptionalInt? = OptionalInt.Missing, ephemeral: OptionalBoolean = OptionalBoolean.Missing, durationSecs: Optional<DurationInDoubleSeconds> = Optional.Missing(), waveform: Optional<String> = Optional.Missing(), flags: Optional<AttachmentFlags> = Optional.Missing())

Properties

Link copied to clipboard
@SerialName(value = "content_type")
val contentType: Optional<String>

The attachment's media type.

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

Whether this attachment is ephemeral

Link copied to clipboard

The name of the attached file.

Link copied to clipboard
Link copied to clipboard

The height of the file (if it is an image).

Link copied to clipboard

The attachment id.

Link copied to clipboard
@SerialName(value = "proxy_url")
val proxyUrl: String

A proxied url of the field.

Link copied to clipboard
val size: Int

The size of the file in bytes.

Link copied to clipboard
val url: String

The source url of the file.

Link copied to clipboard

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

Link copied to clipboard

The width of the file (if it is an image).