discord_gleam/types/message

Types

An embed, simplified for now.
See https://discord.com/developers/docs/resources/channel#embed-object

pub type Embed {
  Embed(title: String, description: String, color: Int)
}

Constructors

  • Embed(title: String, description: String, color: Int)

Our message type, holds content and embeds and is passed to the low-level networking functions

pub type Message {
  Message(content: String, embeds: List(Embed))
}

Constructors

  • Message(content: String, embeds: List(Embed))

Values

pub fn embed_to_json(embed: Embed) -> Json

Convert an embed to a JSON object

pub fn to_string(msg: Message) -> String

Convert a message to a JSON string

Search Document