Package ai.tock.bot.connector.alexa
Class AlexaBuildersKt
-
- All Implemented Interfaces:
public final class AlexaBuildersKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static ConnectorTypealexaConnectorType
-
Method Summary
Modifier and Type Method Description final ConnectorTypegetAlexaConnectorType()The Alexa ConnectorType. final static <T extends Bus<T>> TsendToAlexa(T $self, Function1<T, AlexaMessage> messageProvider, Long delay)Sends an Alexa message only if the ConnectorType of the current BotBus is alexaConnectorType. final static <T extends Bus<T>> TendForAlexa(T $self, Function1<T, AlexaMessage> messageProvider, Long delay)Sends an Alexa message as last bot answer, only if the ConnectorType of the current BotBus is alexaConnectorType. final static <T extends Bus<T>> TwithAlexa(T $self, Function0<AlexaMessage> messageProvider)Adds an Alexa ConnectorMessage if the current connector is Alexa. final static AlexaMessagealexaEndConversation()End the conversation with the skill. final static AlexaMessagealexaReprompt(I18nTranslator $self, CharSequence reprompt)Set a reprompt. final static AlexaMessagealexaStandardCard(I18nTranslator $self, CharSequence title, CharSequence text, String smallImageUrl, String largeImageUrl)Add the specified card. -
-
Method Detail
-
getAlexaConnectorType
final ConnectorType getAlexaConnectorType()
The Alexa ConnectorType.
-
sendToAlexa
final static <T extends Bus<T>> T sendToAlexa(T $self, Function1<T, AlexaMessage> messageProvider, Long delay)
Sends an Alexa message only if the ConnectorType of the current BotBus is alexaConnectorType.
-
endForAlexa
final static <T extends Bus<T>> T endForAlexa(T $self, Function1<T, AlexaMessage> messageProvider, Long delay)
Sends an Alexa message as last bot answer, only if the ConnectorType of the current BotBus is alexaConnectorType.
-
withAlexa
final static <T extends Bus<T>> T withAlexa(T $self, Function0<AlexaMessage> messageProvider)
Adds an Alexa ConnectorMessage if the current connector is Alexa. You need to call BotBus.send or BotBus.end later to send this message.
-
alexaEndConversation
final static AlexaMessage alexaEndConversation()
End the conversation with the skill.
-
alexaReprompt
final static AlexaMessage alexaReprompt(I18nTranslator $self, CharSequence reprompt)
Set a reprompt.
-
alexaStandardCard
final static AlexaMessage alexaStandardCard(I18nTranslator $self, CharSequence title, CharSequence text, String smallImageUrl, String largeImageUrl)
Add the specified card.
-
-
-
-