tock / ai.tock.bot.engine.message / Choice

# Choice

`data class Choice : Message` (source)

A user choice.

### Constructors

#### <init> | `Choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, parameters: Map<String, String> = emptyMap(), delay: Long = 0)` A user choice. `Choice(intentName: String, parameters: Map<String, String> = emptyMap(), delay: Long = 0)`

### Properties

#### delay | `val delay: Long`
#### eventType | `val eventType: EventType`
#### intentName | `val intentName: String`
#### parameters | `val parameters: Map<String, String>`

### Functions

#### isSimpleMessage | `fun isSimpleMessage(): Boolean`
#### toAction | `fun toAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action`
#### toPrettyString | Returns a human readable string representation of the message. `fun toPrettyString(): String`

### Companion Object Functions

#### fromText | Returns a choice from text that will be analyzed by the NLP engine. `fun fromText(text: String, nlpText: String? = null, imageUrl: String? = null): Choice`