public StoryHandlerDefinition extends BotBus
Story handler definitions are used in interface StoryHandler to provide custom context and to manage specific connector behaviour.
Implementations should usually use class StoryHandlerDefinitionBase.
@Nullable ConnectorStoryHandler<?> getConnector()
The interface ConnectorStoryHandler provided for the current BotBus.targetConnectorType - null if it does not exist.
interface ConnectorStoryHandlervoid handle()
The main method to implement.
void answerWith(@Nullable
java.lang.CharSequence p,
@NotNull
kotlin.jvm.functions.Function0<? extends java.lang.Object> messageProvider)
Answers with the specified parameters.
p - used if messageProvider returns nullmessageProvider - provides the answer - a message or a list of messages