tock / ai.tock.bot.definition / StoryHandler

# StoryHandler

`interface StoryHandler` (source)

Receive a sentence or action, and send the answer.

Story handlers should usually not directly extend this class, but instead extend StoryHandlerBase.

### Functions

#### handle | Receive a message from the bus. `abstract fun handle(bus: BotBus): Unit`
#### support | What is the probability of bot support for the current request? `open fun support(bus: BotBus): Double`

### Inheritors

#### StoryHandlerBase | Base implementation of StoryHandler. Provides also a convenient implementation of I18nKeyProvider to support i18n. `abstract class StoryHandlerBase<out T : StoryHandlerDefinition> : StoryHandler, I18nKeyProvider, IntentAware`