-
public final class WhatsAppBuilderKt
-
-
Field Summary
Fields Modifier and Type Field Description private final ConnectorTypewhatsAppConnectorType
-
Method Summary
Modifier and Type Method Description final ConnectorTypegetWhatsAppConnectorType()The WhatsApp connector type. final <T extends Bus<T>> TsendToWhatsApp(T $self, Function1<T, WhatsAppBotMessage> messageProvider, Long delay)Sends an WhatsApp message only if the ConnectorType of the current BotBus is whatsAppConnectorType. final <T extends Bus<T>> TendForWhatsApp(T $self, Function1<T, WhatsAppBotMessage> messageProvider, Long delay)Sends an WhatsApp message as last bot answer, only if the ConnectorType of the current BotBus is whatsAppConnectorType. final <T extends Bus<T>> TwithWhatsApp(T $self, Function0<WhatsAppBotMessage> messageProvider)Adds a WhatsApp ConnectorMessage if the current connector is WhatsApp. final WhatsAppBotTextMessagewhatsAppText(BotBus $self, CharSequence text, Boolean previewUrl)Creates a WhatsAppBotTextMessage. final WhatsAppBotImageMessagewhatsAppImage(BotBus $self, ByteArray byteImages, String contentType, CharSequence caption)Creates a WhatsAppBotImageMessage. final WhatsAppBotInteractiveMessagewhatsAppInteractiveMessage(BotBus $self, String nameSpace, String templateName, List<WhatsAppComponent> components)Creates a WhatsAppBotInteractiveMessage -
-
Method Detail
-
getWhatsAppConnectorType
final ConnectorType getWhatsAppConnectorType()
The WhatsApp connector type.
-
sendToWhatsApp
final <T extends Bus<T>> T sendToWhatsApp(T $self, Function1<T, WhatsAppBotMessage> messageProvider, Long delay)
Sends an WhatsApp message only if the ConnectorType of the current BotBus is whatsAppConnectorType.
-
endForWhatsApp
final <T extends Bus<T>> T endForWhatsApp(T $self, Function1<T, WhatsAppBotMessage> messageProvider, Long delay)
Sends an WhatsApp message as last bot answer, only if the ConnectorType of the current BotBus is whatsAppConnectorType.
-
withWhatsApp
final <T extends Bus<T>> T withWhatsApp(T $self, Function0<WhatsAppBotMessage> messageProvider)
Adds a WhatsApp ConnectorMessage if the current connector is WhatsApp. You need to call BotBus.send or BotBus.end later to send this message.
-
whatsAppText
final WhatsAppBotTextMessage whatsAppText(BotBus $self, CharSequence text, Boolean previewUrl)
Creates a WhatsAppBotTextMessage.
- Parameters:
text- the text sentpreviewUrl- is preview mode is used?
-
whatsAppImage
final WhatsAppBotImageMessage whatsAppImage(BotBus $self, ByteArray byteImages, String contentType, CharSequence caption)
Creates a WhatsAppBotImageMessage.
-
whatsAppInteractiveMessage
final WhatsAppBotInteractiveMessage whatsAppInteractiveMessage(BotBus $self, String nameSpace, String templateName, List<WhatsAppComponent> components)
Creates a WhatsAppBotInteractiveMessage
-
-
-
-