interface BotBus : Bus<BotBus>
(source)
Bus implementation for Tock integrated mode.
action |
The user action. abstract val action: Action |
botDefinition |
The bot definition of the current bot. abstract val botDefinition: BotDefinition |
connectorData |
The data specific to the connector (if any). abstract val connectorData: ConnectorData |
contextId |
The current context identifier. open val contextId: String? |
currentDialog |
The current dialog for this user (may be different from the initial dialog). abstract val currentDialog: Dialog |
currentIntent |
The current intent for this user (may be different from the initial intent). open val currentIntent: IntentAware? |
dialog |
The initial dialog for this user. abstract val dialog: Dialog |
entities |
The entities in the dialog state. abstract val entities: Map<String, EntityStateValue> |
i18nProvider |
To manage i18n. abstract var i18nProvider: I18nKeyProvider |
nextUserActionState |
Qualify the next user action. abstract var nextUserActionState: NextUserActionState? |
step |
open var step: StoryStep<out StoryHandlerDefinition>? |
stepName |
The name of the step if any. open val stepName: String? |
story |
The current story. abstract var story: Story |
test |
Is it a test mode ? open val test: Boolean |
underlyingConnector |
The underlying Connector used. Please do not use this method as it is exposed for third party libraries only. abstract val underlyingConnector: Connector |
userPreferences |
User preferences of the current user. abstract val userPreferences: UserPreferences |
userText |
The text sent by the user if any. open val userText: String? |
userTimeline |
The user timeline. Gets history and data about the user. abstract val userTimeline: UserTimeline |
booleanChoice |
Returns true if the specified choice parameter has the "true" value, false either. open fun booleanChoice(key: ParameterKey): Boolean |
changeContextValue |
Updates persistent context value. Do not store Collection or Map in the context, only plain objects or typed arrays. open fun changeContextValue(name: String, value: Any?): Unit
Updates persistent context value. open fun changeContextValue(key: ParameterKey, value: Any?): Unit |
changeEntityText |
Updates the current entity text value in the dialog. open fun changeEntityText(entity: Entity, textContent: String?): Unit |
changeEntityValue |
Updates the current entity value in the dialog. open fun changeEntityValue(role: String, newValue: EntityValue?): Unit open fun changeEntityValue(entity: Entity, newValue: Value?): Unit open fun changeEntityValue(entity: Entity, newValue: EntityValue): Unit |
choice |
Returns the value of the specified choice parameter, null if the user action is not a SendChoice or if this parameter is not set. open fun choice(key: ParameterKey): String? |
contextValue |
Returns the persistent current context value. open fun <T : Any> contextValue(name: String): T? open fun <T : Any> contextValue(key: ParameterKey): T? |
defaultDelay |
Get the default delay between two answers. open fun defaultDelay(answerIndex: Int): Long |
end |
Sends Message as last bot answer. open fun end(message: Message, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
Sends Action as last bot answer. abstract fun end(action: Action, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
Sends a MessagesList and end the dialog. open fun end(messages: MessagesList, initialDelay: Long = 0): BotBus
Sends messages provided by messageProvider as last bot answer. if messageProvider returns a CharSequence send it as text. Else call simply end(). open fun end(delay: Long, messageProvider: BotBus.() -> Any?): BotBus
Sends i18nText as last bot answer. open fun end(i18nText: CharSequence, delay: Long, vararg i18nArgs: Any?): BotBus open fun end(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
Send previously registered ConnectorMessage as last bot answer. open fun end(delay: Long): BotBus |
endRawText |
Sends text that should not be translated as last bot answer. open fun endRawText(plainText: CharSequence?, delay: Long): BotBus |
entityText |
Returns the current text content for the specified entity. open fun entityText(entity: Entity): String? open fun entityText(role: String): String? |
entityValue |
Returns the current value for the specified entity role. open fun <T : Value> entityValue(role: String, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
Returns the current value for the specified entity. open fun <T : Value> entityValue(entity: Entity, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T? |
entityValueDetails |
Returns the current EntityValue for the specified entity. open fun entityValueDetails(entity: Entity): EntityValue?
Returns the current EntityValue for the specified role. open fun entityValueDetails(role: String): EntityValue? |
getBusContextValue |
Returns the non persistent current context value. Bus context values are useful to store a temporary (ie request scoped) state. abstract fun <T> getBusContextValue(name: String): T? open fun <T> getBusContextValue(key: ParameterKey): T? |
handleAndSwitchStory |
Handles the action and switches the context to the specified story definition. open fun handleAndSwitchStory(storyDefinition: StoryDefinition, starterIntent: Intent = storyDefinition.mainIntent()): Unit |
hasActionEntity |
Returns true if the current action has the specified entity role. open fun hasActionEntity(role: String): Boolean open fun hasActionEntity(entity: Entity): Boolean |
hasChoiceValue |
Checks that the specified choice parameter has the specified value. open fun hasChoiceValue(param: ParameterKey, value: ParameterKey): Boolean |
i18n |
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue |
i18nKey |
Gets an i18n label with the specified key. open fun i18nKey(key: String, defaultLabel: CharSequence, vararg args: Any?): I18nLabelValue |
isChoiceAction |
Is this current action is a SendChoice? open fun isChoiceAction(): Boolean |
isFeatureEnabled |
Is the feature enabled? open fun isFeatureEnabled(feature: FeatureType, default: Boolean = false): Boolean |
isIntent |
To know if the current intent is owned by the IntentAware. open fun isIntent(intentOwner: IntentAware): Boolean |
markAsUnknown |
Marks the current as not understood in the nlp model. abstract fun markAsUnknown(): Unit |
nlpStats |
Returns the NLP call stats if an NLP call has occurred, null either. open fun nlpStats(): NlpCallStats? |
reloadProfile |
Reloads the user profile. abstract fun reloadProfile(): Unit |
removeAllEntityValues |
Removes all current entity values. open fun removeAllEntityValues(): Unit |
removeEntityValue |
Removes entity value for the specified role. open fun removeEntityValue(role: String): Unit open fun removeEntityValue(entity: Entity): Unit |
resetDialogState |
Resets all entity values, context values, ai.tock.bot.engine.dialog.DialogState.userLocation and ai.tock.bot.engine.dialog.DialogState.nextActionState but keep entity values history. open fun resetDialogState(): Unit |
send |
Sends a Message. open fun send(message: Message, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
Sends a MessagesList. open fun send(messages: MessagesList, initialDelay: Long = 0): BotBus
Sends an Action. abstract fun send(action: Action, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
Sends messages provided by messageProvider. if messageProvider returns a CharSequence send it as text. Else call simply send(). open fun send(delay: Long, messageProvider: BotBus.() -> Any?): BotBus
Sends previously registered ConnectorMessage. open fun send(delay: Long): BotBus
Sends i18nText. open fun send(i18nText: CharSequence, delay: Long, vararg i18nArgs: Any?): BotBus open fun send(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus |
setBusContextValue |
Updates the non persistent current context value. Bus context values are useful to store a temporary (ie request scoped) state. abstract fun setBusContextValue(key: String, value: Any?): Unit open fun setBusContextValue(key: ParameterKey, value: Any?): Unit |
skipAnswer |
Does not send an answer. Synchronous Connectors (like Google Assistant or Alexa) usually do not support skipping answer. open fun skipAnswer(): Unit |
switchStory |
Switches the context to the specified story definition (start a new Story). open fun switchStory(storyDefinition: StoryDefinition, starterIntent: Intent = storyDefinition.mainIntent()): Unit |
withMessage |
Adds the specified ConnectorMessage to the bus context if the targetConnectorType is compatible. open fun withMessage(message: ConnectorMessage): BotBus |
withNotificationType |
Adds the specified ActionNotificationType to the bus context. abstract fun withNotificationType(notificationType: ActionNotificationType): BotBus |
withPriority |
Adds the specified ActionPriority to the bus context. abstract fun withPriority(priority: ActionPriority): BotBus |
withVisibility |
Adds the specified ActionVisibility to the bus context. abstract fun withVisibility(visibility: ActionVisibility): BotBus |
retrieveCurrentBus |
Helper method to return the current bus, linked to the thread currently used by the handler. (warning: advanced usage only). fun retrieveCurrentBus(): BotBus? |
alexaReprompt |
Set a reprompt. fun I18nTranslator.alexaReprompt(reprompt: CharSequence): AlexaMessage |
alexaStandardCard |
Add the specified card. fun I18nTranslator.alexaStandardCard(title: CharSequence, text: CharSequence, smallImageUrl: String, largeImageUrl: String = smallImageUrl): AlexaMessage |
attachmentField |
fun I18nTranslator.attachmentField(title: String, value: String, short: Boolean = true): AttachmentField |
basicCard |
Provides a GABasicCard with all available parameters. fun I18nTranslator.basicCard(title: CharSequence?, subtitle: CharSequence?, formattedText: CharSequence?, image: GAImage?, buttons: List<GAButton>): GABasicCard
Provides a GABasicCard with only one GAButton (only one is supported for now anyway). fun I18nTranslator.basicCard(title: CharSequence? = null, subtitle: CharSequence? = null, formattedText: CharSequence? = null, image: GAImage? = null, button: GAButton? = null): GABasicCard
Provides a GABasicCard without formattedText. fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence, image: GAImage, button: GAButton): GABasicCard
Provides a GABasicCard with title and button. fun I18nTranslator.basicCard(title: CharSequence, button: GAButton): GABasicCard
Provides a GABasicCard with title and subtitle. fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence): GABasicCard
Provides a GABasicCard with title and image. fun I18nTranslator.basicCard(title: CharSequence, image: GAImage): GABasicCard
Provides a GABasicCard with title, subtitle and image. fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence, image: GAImage): GABasicCard
Provides a GABasicCard with an image. fun I18nTranslator.basicCard(image: GAImage): GABasicCard |
buttonsTemplate |
Creates a button template https://developers.facebook.com/docs/messenger-platform/send-api-reference/button-template fun I18nTranslator.buttonsTemplate(text: CharSequence, vararg actions: UserAction): AttachmentMessage fun I18nTranslator.buttonsTemplate(text: CharSequence, actions: List<UserAction>): AttachmentMessage |
callToButton |
fun I18nTranslator.callToButton(title: CharSequence, phoneNumber: String): CallButton |
endIfPublicTwitter |
End the conversation only if the visibility is public fun BotBus.endIfPublicTwitter(): Unit |
expectedIntentForCarousel |
Provides a GAExpectedIntent with a GACarouselSelect. fun I18nTranslator.expectedIntentForCarousel(items: List<GACarouselItem>): GAExpectedIntent |
expectedIntentForList |
Provides a GAExpectedIntent with a GAListSelect. fun I18nTranslator.expectedIntentForList(items: List<GAListItem>, title: CharSequence? = null): GAExpectedIntent |
expectedIntentForSimpleSelect |
Provides a GAExpectedIntent with a GASimpleSelect. fun I18nTranslator.expectedIntentForSimpleSelect(items: List<GASelectItem>): GAExpectedIntent |
flexibleSimpleResponse |
Provides a GASimpleResponse with specified textToSpeech, ssml and displayText. fun I18nTranslator.flexibleSimpleResponse(textToSpeech: CharSequence? = null, ssml: CharSequence? = null, displayText: CharSequence? = null): GASimpleResponse |
gaButton |
Provides a GAButton. fun I18nTranslator.gaButton(title: CharSequence, url: String): GAButton |
gaFinalMessage |
Final Google Assistant message (end of conversation). fun I18nTranslator.gaFinalMessage(richResponse: GARichResponse): GAResponseConnectorMessage fun I18nTranslator.gaFinalMessage(text: CharSequence? = null): GAResponseConnectorMessage |
gaFlexibleMessageForCarousel |
Add a basic card if only one element in the items list, in order to avoid the limitation of 2 items. fun I18nTranslator.gaFlexibleMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList(), oneItemTitle: CharSequence? = null, oneItemSubtitle: CharSequence? = null, oneItemDescription: CharSequence? = null, oneItemSuggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage fun I18nTranslator.gaFlexibleMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList(), oneItemSuggestions: List<CharSequence> = emptyList(), oneItemBasicCardProvider: (GACarouselItem) -> GABasicCard = {
basicCard(
it.title.raw,
if (it.image != null) it.description?.raw else null,
if (it.image == null) it.description?.raw else null,
it.image
)
}): GAResponseConnectorMessage |
gaFlexibleMessageForList |
Add a basic card if only one element in the items list in order to avoid the limitation of 2 items. fun I18nTranslator.gaFlexibleMessageForList(items: List<GAListItem>, title: CharSequence? = null, suggestions: List<CharSequence> = emptyList(), oneItemTitle: CharSequence? = null, oneItemSubtitle: CharSequence? = null, oneItemDescription: CharSequence? = null, oneItemSuggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage |
gaImage |
Provides a GAImage with all available parameters. fun I18nTranslator.gaImage(url: String, accessibilityText: CharSequence, height: Int? = null, width: Int? = null): GAImage |
gaMessage |
Google Assistant Message with all available parameters. fun I18nTranslator.gaMessage(inputPrompt: GAInputPrompt, possibleIntents: List<GAExpectedIntent> = listOf(
expectedTextIntent()
), speechBiasingHints: List<String> = emptyList()): GAResponseConnectorMessage
Google Assistant Message with suggestions. fun I18nTranslator.gaMessage(text: CharSequence, vararg suggestions: CharSequence): GAResponseConnectorMessage
Google Assistant Message with GABasicCard. fun I18nTranslator.gaMessage(text: CharSequence, basicCard: GABasicCard): GAResponseConnectorMessage
Google Assistant Message with GARichResponse. fun I18nTranslator.gaMessage(richResponse: GARichResponse): GAResponseConnectorMessage
Google Assistant Message with one GAExpectedIntent. fun I18nTranslator.gaMessage(possibleIntent: GAExpectedIntent): GAResponseConnectorMessage
Google Assistant Message with multiple GAExpectedIntent. fun I18nTranslator.gaMessage(possibleIntents: List<GAExpectedIntent>): GAResponseConnectorMessage
Google Assistant Message with text and multiple GAExpectedIntent. fun I18nTranslator.gaMessage(text: CharSequence, possibleIntents: List<GAExpectedIntent>): GAResponseConnectorMessage
Provides a message with a GAListSelect. fun I18nTranslator.gaMessage(gaRichResponse: GARichResponse, listItems: List<GAListItem>, title: CharSequence? = null): GAResponseConnectorMessage |
gaMessageForCarousel |
Provides a message with a GACarouselSelect. fun I18nTranslator.gaMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage |
gaMessageForList |
Provides a message with a GAListSelect and a list of GASuggestion. fun I18nTranslator.gaMessageForList(items: List<GAListItem>, title: CharSequence? = null, suggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage |
gaTransactionOrderDecision |
Build an GATransactionDecisionValueSpecV3 message. fun I18nTranslator.gaTransactionOrderDecision(order: GAOrder, orderOptions: GAOrderOptionsV3? = null, paymentParameters: GAPaymentParameters? = null, presentationOptions: GAPresentationOptions? = null): GAResponseConnectorMessage |
gaTransactionOrderUpdate |
Build an GAStructuredResponse from an GAOrderUpdateV3. fun I18nTranslator.gaTransactionOrderUpdate(orderUpdate: GAOrderUpdateV3): GAResponseConnectorMessage |
gaTransactionRequirementsCheckV3 |
Build a GATransactionRequirementsCheckSpecV3 response. fun I18nTranslator.gaTransactionRequirementsCheckV3(): GAResponseConnectorMessage |
genericElement |
Creates a generic element. fun I18nTranslator.genericElement(title: CharSequence, subtitle: CharSequence? = null, imageUrl: String? = null, buttons: List<Button>? = null): Element |
inputPrompt |
Provides a GAInputPrompt with all available parameters. fun I18nTranslator.inputPrompt(richResponse: GARichResponse, noInputPrompts: List<GASimpleResponse> = emptyList()): GAInputPrompt
Provides a GAInputPrompt with a simple GARichResponse builder. fun I18nTranslator.inputPrompt(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, noInputPrompts: List<GASimpleResponse> = emptyList()): GAInputPrompt |
item |
Provides a GAItem with all available parameters. fun I18nTranslator.item(simpleResponse: GASimpleResponse? = null, basicCard: GABasicCard? = null, structuredResponse: GAStructuredResponse? = null): GAItem
Provides a GAItem with a GABasicCard. fun I18nTranslator.item(basicCard: GABasicCard): GAItem
Provides a GAItem with a GAStructuredResponse. fun I18nTranslator.item(structuredResponse: GAStructuredResponse): GAItem
Provides a GAItem with a GASimpleResponse. fun I18nTranslator.item(simpleResponse: GASimpleResponse): GAItem |
linkOutSuggestion |
Provides a GALinkOutSuggestion. fun I18nTranslator.linkOutSuggestion(destinationName: CharSequence, url: String): GALinkOutSuggestion |
multiLineMessage |
fun I18nTranslator.multiLineMessage(lines: List<CharSequence>, channel: String? = null): SlackMessageOut |
nlpOption |
Creates a NLP Option Quick Reply without description fun I18nTranslator.nlpOption(label: CharSequence): OptionWithoutDescription fun I18nTranslator.nlpOption(label: CharSequence, description: CharSequence): Option |
nlpPostbackButton |
This button does not use any custom payload, but the textToSend will we parsed by the NLP engine. fun I18nTranslator.nlpPostbackButton(title: CharSequence, textToSend: CharSequence = title): PostbackButton |
nlpQuickReply |
This quick reply does not use any custom payload, but the textToSend will we parsed by the NLP engine. fun I18nTranslator.nlpQuickReply(title: CharSequence, textToSend: CharSequence = title, imageUrl: String? = null): QuickReply |
optionValueSpec |
Provides a GAOptionValueSpec with all available parameters. fun I18nTranslator.optionValueSpec(simpleSelect: GASimpleSelect? = null, listSelect: GAListSelect? = null, carouselSelect: GACarouselSelect? = null): GAOptionValueSpec |
permissionIntent |
Google Assistant Message asking for GAPermission. fun I18nTranslator.permissionIntent(optionalContext: CharSequence? = null, vararg permissions: GAPermission): GAExpectedIntent |
richResponse |
Provides a GARichResponse with suggestions as String. fun I18nTranslator.richResponse(items: List<GAItem>, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
Provides a GARichResponse without linkOutSuggestion. fun I18nTranslator.richResponse(items: List<GAItem>, vararg suggestions: CharSequence): GARichResponse fun I18nTranslator.richResponse(items: List<GAItem>, suggestions: List<CharSequence>): GARichResponse
Provides a GARichResponse with only one GAItem. fun I18nTranslator.richResponse(item: GAItem, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse fun I18nTranslator.richResponse(item: GAItem, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
Provides a GARichResponse with text item. fun I18nTranslator.richResponse(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse fun I18nTranslator.richResponse(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse fun I18nTranslator.richResponse(text: CharSequence, vararg suggestions: CharSequence): GARichResponse fun I18nTranslator.richResponse(text: CharSequence, suggestions: List<CharSequence>): GARichResponse
Provides a GARichResponse with a text and a GABasicCard. fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, suggestions: List<CharSequence>): GARichResponse fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, vararg suggestions: CharSequence): GARichResponse
Provides a GARichResponse with a GABasicCard. fun I18nTranslator.richResponse(basicCard: GABasicCard, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse fun I18nTranslator.richResponse(basicCard: GABasicCard, suggestions: List<CharSequence>): GARichResponse fun I18nTranslator.richResponse(basicCard: GABasicCard, vararg suggestions: CharSequence): GARichResponse |
simpleResponse |
Provides a GASimpleResponse with specified CharSequence. fun I18nTranslator.simpleResponse(text: CharSequence): GASimpleResponse |
slackAttachment |
fun I18nTranslator.slackAttachment(text: CharSequence? = null, vararg buttons: Button): SlackMessageAttachment fun I18nTranslator.slackAttachment(vararg buttons: Button): SlackMessageAttachment fun I18nTranslator.slackAttachment(text: CharSequence? = null, buttons: List<Button> = emptyList(), color: String = "good", pretext: String? = null, fallback: String = translate(text).toString(), vararg fields: AttachmentField): SlackMessageAttachment |
slackMessage |
fun I18nTranslator.slackMessage(message: CharSequence, vararg attachments: SlackMessageAttachment): SlackMessageOut fun I18nTranslator.slackMessage(message: CharSequence, channel: String? = null, vararg attachments: SlackMessageAttachment): SlackMessageOut |
standaloneQuickReply |
Creates a quick reply from an I18nTranslator. fun I18nTranslator. |
suggestion |
Provides a GASuggestion. fun I18nTranslator.suggestion(text: CharSequence): GASuggestion |
teamsCarousel |
fun I18nTranslator.teamsCarousel(carouselContent: List<TeamsBotMessage>): TeamsCarousel |
teamsHeroCard |
fun I18nTranslator.teamsHeroCard(title: CharSequence? = null, subtitle: CharSequence? = null, attachmentContent: CharSequence, images: List<CardImage>? = null, buttons: List<CardAction>? = null, tap: CardAction? = null): TeamsHeroCard |
teamsMessage |
fun I18nTranslator.teamsMessage(text: CharSequence): TeamsBotTextMessage |
teamsMessageWithButtonCard |
fun I18nTranslator.teamsMessageWithButtonCard(urlText: CharSequence, links: List<CardAction>): TeamsCardAction |
text |
Creates a text with quick replies. fun I18nTranslator.text(text: CharSequence, vararg quickReplies: QuickReply): TextMessage fun I18nTranslator.text(text: CharSequence, quickReplies: List<QuickReply>): TextMessage |
textMessage |
fun I18nTranslator.textMessage(message: CharSequence): SlackMessageOut |
tweet |
Create a tweet fun BotBus.tweet(message: CharSequence): Tweet |
tweetWithInviteForDM |
Create a tweet with a link for DM to the account listened fun BotBus.tweetWithInviteForDM(message: CharSequence, welcomeMessageID: String? = null, defaultMessage: String? = null): Tweet |
updatePermissionIntent |
Google Assistant Message asking for update GAPermission. fun I18nTranslator.updatePermissionIntent(intent: String): GAExpectedIntent |
urlButton |
Creates an url button. fun I18nTranslator.urlButton(title: CharSequence, url: String): UrlButton |
webMessage |
Creates a text with buttons. fun I18nTranslator. fun I18nTranslator. fun I18nTranslator.webMessage(title: CharSequence, vararg buttons: Button): WebMessage
Creates a text with a list of buttons. fun I18nTranslator.webMessage(title: CharSequence, buttons: List<Button> = emptyList()): WebMessage |
whatsAppImage |
Creates a WhatsAppBotImageMessage. fun BotBus.whatsAppImage(byteImages: ByteArray, contentType: String = "image/png", : CharSequence? = null): WhatsAppBotImageMessage |
whatsAppInteractiveMessage |
Creates a WhatsAppBotInteractiveMessage fun BotBus.whatsAppInteractiveMessage(nameSpace: String, templateName: String, components: List<WhatsAppComponent>? = emptyList()): WhatsAppBotInteractiveMessage |
whatsAppText |
Creates a WhatsAppBotTextMessage. fun BotBus.whatsAppText(text: CharSequence, previewUrl: Boolean = false): WhatsAppBotTextMessage |
withPublicTwitter |
Adds a Twitter ConnectorMessage if the current connector is Twitter and the interface is public. You need to call BotBus.send or BotBus.end later to send this message. fun BotBus.withPublicTwitter(messageProvider: () -> TwitterPublicConnectorMessage): BotBus |
withTwitter |
Adds a Twitter ConnectorMessage if the current connector is Twitter and the interface is not public. You need to call BotBus.send or BotBus.end later to send this message. fun BotBus.withTwitter(messageProvider: () -> TwitterConnectorMessage): BotBus
Adds a Twitter ConnectorMessage if the current connector is Twitter and the current connector is connectorId. You need to call T:BusT.send or T:BusT.end later to send this message. fun BotBus.withTwitter(connectorId: String, messageProvider: () -> TwitterConnectorMessage): BotBus |
BotBusMock |
A Bus mock used in unit tests. open class BotBusMock : BotBus |
ConnectorStoryHandler |
Handler for specific ConnectorType. interface ConnectorStoryHandler<out T : StoryHandlerDefinition> : BotBus |
ConnectorStoryHandlerBase |
Base implementation of ConnectorStoryHandler. abstract class ConnectorStoryHandlerBase<out T : StoryHandlerDefinition> : BotBus, ConnectorStoryHandler<T> |
StoryHandlerDefinition |
Story handler definitions are used in StoryHandler to provide custom context and to manage specific connector behaviour. interface StoryHandlerDefinition : BotBus |
StoryHandlerDefinitionBase |
Base implementation of StoryHandlerDefinition. abstract class StoryHandlerDefinitionBase<T : ConnectorStoryHandlerBase<*>> : BotBus, StoryHandlerDefinition |