diff --git a/core/src/main/kotlin/com/justai/jaicf/builder/ScenarioBuilder.kt b/core/src/main/kotlin/com/justai/jaicf/builder/ScenarioBuilder.kt index 76fb1faa..e223fa04 100644 --- a/core/src/main/kotlin/com/justai/jaicf/builder/ScenarioBuilder.kt +++ b/core/src/main/kotlin/com/justai/jaicf/builder/ScenarioBuilder.kt @@ -261,6 +261,7 @@ class StateBuilder internal constructor( * @param body a code block of the action */ fun action(body: @ScenarioDsl ActionContext.() -> Unit) { + check(action == null) { "Multiple actions are not available in a single state: ${path}" } action = { channelToken.invoke(body) } }