discord_gleam/ws/commands/update_presence

Types

pub type Activity {
  Activity(
    type_: ActivityType,
    name: String,
    url: option.Option(String),
    state: option.Option(String),
  )
}

Constructors

pub type ActivityType {
  Playing
  Streaming
  Listening
  Watching
  Custom
  Competing
}

Constructors

  • Playing
  • Streaming
  • Listening
  • Watching
  • Custom
  • Competing
pub type Presence {
  Presence(
    status: Status,
    activities: List(Activity),
    afk: Bool,
    since: option.Option(Int),
  )
}

Constructors

pub type Status {
  Online
  Idle
  DoNotDisturb
  Invisible
  Offline
}

Constructors

  • Online
  • Idle
  • DoNotDisturb
  • Invisible
  • Offline

Values

pub fn activity_to_json(activity: Activity) -> json.Json
pub fn competing(name: String) -> Activity
pub fn custom(text: String) -> Activity
pub fn listening(name: String) -> Activity
pub fn playing(name: String) -> Activity
pub fn status_to_string(status: Status) -> String
pub fn streaming(name: String, url: String) -> Activity
pub fn to_json(presence: Presence) -> json.Json
pub fn type_to_int(type_: ActivityType) -> Int
pub fn update_presence(bot: bot.Bot, presence: Presence) -> Nil
pub fn watching(name: String) -> Activity
Search Document