Slack.State (SlackKit v0.25.0-alpha.0)

View Source

Slack state.

Summary

Functions

Callback implementation for Access.fetch/2.

Callback implementation for Access.pop/2.

Pattern matches against messages and returns updated Slack state.

Types

t()

@type t() :: %Slack.State{
  bots: map(),
  channels: map(),
  client: module() | nil,
  groups: map(),
  ims: map(),
  me: map() | nil,
  process: pid() | nil,
  team: map() | nil,
  token: String.t() | nil,
  users: map()
}

Functions

fetch(client, key)

Callback implementation for Access.fetch/2.

get(client, key, default)

See Map.get/3.

get_and_update(client, key, function)

Callback implementation for Access.get_and_update/3.

pop(client, key)

Callback implementation for Access.pop/2.

update(map, slack)

@spec update(map(), t()) :: t()

Pattern matches against messages and returns updated Slack state.