# `WardrikSlack.Messages`

Passes messages posted in Slack channels to `WardrikChannel.received/2`, and reacts to them.

  * A message the agent takes gets :eyes:, then :white_check_mark: once it's answered.
  * A message the agent couldn't take gets a reply in its thread saying why.

Ignores edits, deletions, messages from bots (the app included), direct messages, and messages
from people in another workspace.

# `answered`

```elixir
@spec answered(WardrikChannel.Workspace.t(), String.t(), [String.t()]) :: :ok
```

Swaps :eyes: for :white_check_mark: on the answered messages `ids`.

# `event`

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

Passes a `message` event to the room's agent. `bot` is the app's own member ID.

Returns `{:asked, conversation}`, `:ignored`, or `{:error, message}` after replying with it.

# `sender`

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

Returns the member `user`, with the name Slack shows for them.

# `stopped`

```elixir
@spec stopped(WardrikChannel.Workspace.t(), String.t(), [String.t()]) :: :ok
```

Removes :eyes: from the messages `ids`, when a run stops before answering.

---

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