# `WardrikSlack.Rooms`

Binds agents to Slack channels, as `WardrikChannel.Rooms` sets out, and shows the binding there.

When the bot is invited into a Slack channel, it posts where things stand:

  * One agent offered - the agent answers there from now on. A button switches between every
    message and mentions only. A menu switches agents or stops it.
  * Several offered - a button for each.
  * None offered - how to offer one.

Removing the bot unbinds the room.

# `answer`

```elixir
@spec answer(WardrikChannel.Workspace.t(), map()) :: :ok | :ignored
```

Handles a room's button press or menu choice, then posts where things stand.

# `event`

```elixir
@spec event(WardrikChannel.Workspace.t(), map(), String.t()) ::
  :ok | :ignored | {:error, term()}
```

Handles `bot`, the app's member ID, joining or leaving a Slack channel.

# `message`

```elixir
@spec message(
  WardrikChannel.Rooms.shown() | :stopped,
  WardrikChannel.Workspace.t(),
  String.t() | nil
) ::
  %{text: String.t(), blocks: [map()]}
```

Returns the message that shows a room's binding.

# `shown`

```elixir
@spec shown(WardrikChannel.Workspace.t(), String.t()) :: String.t()
```

Returns `agent` without the workspace owner's prefix, as `triage` for `acme/triage`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
