# `BB.Dsl.State`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/dsl/state.ex#L5)

A custom operational state for the robot.

States define the operational context the robot can be in (beyond the
built-in `:idle`). Commands specify which states they can run in via
`allowed_states`, and can transition the robot to new states via
`next_state:` in their result.

The `:idle` state is always implicitly available and is the default
initial state.

# `t`

```elixir
@type t() :: %BB.Dsl.State{
  __identifier__: any(),
  __spark_metadata__: Spark.Dsl.Entity.spark_meta(),
  doc: String.t() | nil,
  name: atom()
}
```

---

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