Nostrum.Struct.Message.Attachment (nostrum v0.11.0-dev)

View Source

Struct representing a Discord message attachment.

Summary

Types

The attachment’s media type

Description for the file (max 1024 characters)

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

Whether this attachment is ephemeral

Name of attached file

Attachment flags combined as a bitfield

Height of the file (if image)

Attachment id

Proxy url of the file

Size of the file in bytes

t()

The title of the file

Source url of the file

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

Width of the file (if image)

Types

content_type()

(since NEXTVERSION)
@type content_type() :: String.t() | nil

The attachment’s media type

description()

(since NEXTVERSION)
@type description() :: String.t() | nil

Description for the file (max 1024 characters)

duration_secs()

(since NEXTVERSION)
@type duration_secs() :: float() | nil

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

ephemeral()

(since NEXTVERSION)
@type ephemeral() :: boolean() | nil

Whether this attachment is ephemeral

filename()

@type filename() :: String.t()

Name of attached file

flags()

(since NEXTVERSION)
@type flags() :: integer() | nil

Attachment flags combined as a bitfield

height()

@type height() :: integer() | nil

Height of the file (if image)

id()

@type id() :: Nostrum.Snowflake.t()

Attachment id

proxy_url()

@type proxy_url() :: String.t()

Proxy url of the file

size()

@type size() :: integer()

Size of the file in bytes

t()

@type t() :: %Nostrum.Struct.Message.Attachment{
  content_type: content_type(),
  description: description(),
  duration_secs: duration_secs(),
  ephemeral: ephemeral(),
  filename: filename(),
  flags: flags(),
  height: height(),
  id: id(),
  proxy_url: proxy_url(),
  size: size(),
  title: title(),
  url: url(),
  waveform: waveform(),
  width: width()
}

title()

(since NEXTVERSION)
@type title() :: String.t() | nil

The title of the file

url()

@type url() :: String.t()

Source url of the file

waveform()

(since NEXTVERSION)
@type waveform() :: String.t() | nil

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

width()

@type width() :: integer() | nil

Width of the file (if image)