Nostrum.Struct.Message (Nostrum v0.4.5) View Source

Struct representing a Discord message.

Link to this section Summary

Types

The activity of the message. Sent with Rich Presence-related chat embeds.

The application of the message. Sent with Rich Presence-related chat embeds.

List of attached files in the message

The user struct of the author

The id of the channel

The content of the message

When the message was edited

List of embedded content in the message

The id of the guild

The id of the message

Partial Guild Member object received with the Message Create event if message came from a guild channel.

Whether this messsage mentions everyone

List of roles ids mentioned in the message

List of users mentioned in the message

Validates if a message was sent

Whether this message is pinned

Reactions to the message.

t()

When the message was sent

Whether this was a TTS message

If the message is generated by a webhook, this is the webhook's id.

Link to this section Types

Specs

activity() :: Nostrum.Struct.Message.Activity.t() | nil

The activity of the message. Sent with Rich Presence-related chat embeds.

Specs

application() :: Nostrum.Struct.Message.Application.t() | nil

The application of the message. Sent with Rich Presence-related chat embeds.

Specs

List of attached files in the message

Specs

author() :: Nostrum.Struct.User.t()

The user struct of the author

Specs

channel_id() :: Nostrum.Snowflake.t()

The id of the channel

Specs

content() :: String.t()

The content of the message

Specs

edited_timestamp() :: String.t() | nil

When the message was edited

Specs

embeds() :: [Nostrum.Struct.Embed.t()]

List of embedded content in the message

Specs

guild_id() :: Nostrum.Snowflake.t() | nil

The id of the guild

Specs

The id of the message

Specs

member() :: Nostrum.Struct.Guild.Member.t() | nil

Partial Guild Member object received with the Message Create event if message came from a guild channel.

Specs

mention_everyone() :: boolean()

Whether this messsage mentions everyone

Specs

mention_roles() :: [Nostrum.Snowflake.t()]

List of roles ids mentioned in the message

Specs

mentions() :: [Nostrum.Struct.User.t()]

List of users mentioned in the message

Specs

nonce() :: String.t() | nil

Validates if a message was sent

Specs

pinned() :: boolean()

Whether this message is pinned

Specs

reactions() :: [Nostrum.Struct.Message.Reaction.t()] | nil

Reactions to the message.

Specs

t() :: %Nostrum.Struct.Message{
  activity: activity(),
  application: application(),
  attachments: attachments(),
  author: author(),
  channel_id: channel_id(),
  content: content(),
  edited_timestamp: edited_timestamp(),
  embeds: embeds(),
  guild_id: guild_id(),
  id: id(),
  member: member(),
  mention_everyone: mention_everyone(),
  mention_roles: mention_roles(),
  mentions: mentions(),
  nonce: nonce(),
  pinned: pinned(),
  reactions: reactions(),
  timestamp: timestamp(),
  tts: tts(),
  type: type(),
  webhook_id: webhook_id()
}

Specs

timestamp() :: String.t()

When the message was sent

Specs

tts() :: boolean()

Whether this was a TTS message

Specs

type() :: integer()

Type of message.

Specs

webhook_id() :: Nostrum.Snowflake.t() | nil

If the message is generated by a webhook, this is the webhook's id.