# `Slink.Context`
[🔗](https://github.com/wkirschbaum/slink/blob/v0.6.0/lib/slink/context.ex#L1)

The context passed to `c:Slink.handle_event/2`.

Handlers are stateless; the context carries what they need to respond:

  * `:transport` — `:socket_mode` or `:http`, whichever delivered the event.
  * `:bot_token` — the bot token (`xoxb-…`) for Web API calls, e.g. via
    `send_message/4`. May be `nil` if the transport was started without one.
  * `:bot_user_id` — the bot's own user id (`U…`), discovered via `auth.test`
    and cached by `Slink.Identity`. Powers `Slink.mentions_me?/1` and lets a
    handler tell its own posts apart. `nil` until the one-off lookup lands
    (shortly after connect / the first event).
  * `:event` — the `Slink.Event` being handled. Carried here so `reply/3` needs
    only the context (channel and thread come from the event, the token from
    the context). Set by the dispatcher before your handler runs.

# `t`

```elixir
@type t() :: %Slink.Context{
  bot_token: String.t() | nil,
  bot_user_id: String.t() | nil,
  event: Slink.Event.t() | nil,
  transport: :socket_mode | :http
}
```

---

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