crux_structs v0.1.6 Crux.Structs.Message View Source
Represents a Discord Message Object.
Differences opposed to the Discord API Object:
:mentionsis a MapSet of user ids
Link to this section Summary
Functions
Creates a Crux.Structs.Message struct from raw data
Link to this section Types
Link to this type
t()
View Source
(since 0.1.0)
t() :: %Crux.Structs.Message{
attachments: [Crux.Structs.Attachment.t()],
author: Crux.Structs.User.t(),
channel_id: Crux.Rest.snowflake(),
content: String.t(),
edited_timestamp: String.t(),
embeds: [Crux.Structs.Embed.t()],
guild_id: Crux.Rest.snowflake() | nil,
id: Crux.Rest.snowflake(),
member: Crux.Structs.Member.t() | nil,
mention_everyone: boolean(),
mention_roles: MapSet.t(Crux.Rest.snowflake()),
mentions: MapSet.t(Crux.Rest.snowflake()),
nonce: String.t() | nil,
pinned: boolean(),
reactions: %{optional(String.t()) => Crux.Structs.Reaction.t()},
timestamp: String.t(),
tts: boolean(),
type: integer(),
webhook_id: Crux.Rest.snowflake() | nil
}
Link to this section Functions
Creates a Crux.Structs.Message struct from raw data.
Automatically invoked by
Crux.Structs.create/2.