public class TwitterBuildersKt
public static int MAX_OPTION_LABEL
public static int MAX_OPTION_DESCRIPTION
public static int MAX_METADATA
@NotNull public static ai.tock.bot.connector.ConnectorType getTwitterConnectorType()
The Twitter connector type.
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessage(@NotNull T $this$directMessage, @NotNull java.lang.CharSequence message)
Creates a direct message with only text
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithButtons(@NotNull T $this$directMessageWithButtons, @NotNull java.lang.CharSequence message, @NotNull java.util.List<? extends ai.tock.bot.connector.twitter.model.CTA> ctas)
Creates a direct message with Buttons
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithButtons(@NotNull T $this$directMessageWithButtons, @NotNull java.lang.CharSequence message, @NotNull ai.tock.bot.connector.twitter.model.CTA... ctas)
Creates a direct message with Buttons
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithOptions(@NotNull T $this$directMessageWithOptions, @NotNull java.lang.CharSequence message, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with quick replies
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithOptions(@NotNull T $this$directMessageWithOptions, @NotNull java.lang.CharSequence message, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with quick replies
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithAttachment(@NotNull T $this$directMessageWithAttachment, @NotNull java.lang.CharSequence message, @NotNull MediaCategory mediaCategory, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an attachment
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithAttachment(@NotNull T $this$directMessageWithAttachment, @NotNull java.lang.CharSequence message, @NotNull MediaCategory mediaCategory, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an attachment
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $this$directMessageWithGIF, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $this$directMessageWithGIF, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $this$directMessageWithGIF, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $this$directMessageWithGIF, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $this$directMessageWithImage, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $this$directMessageWithImage, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $this$directMessageWithImage, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $this$directMessageWithImage, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $this$directMessageWithVideo, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $this$directMessageWithVideo, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $this$directMessageWithVideo, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $this$directMessageWithVideo, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> WebUrl webUrl(@NotNull T $this$webUrl, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence url)
Creates a url button
@NotNull public static <T extends Bus<T>> Option option(@NotNull T $this$option, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence description, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull kotlin.Pair... parameters)
Creates an Option Quick Reply
@NotNull public static <T extends Bus<T>> OptionWithoutDescription option(@NotNull T $this$option, @NotNull java.lang.CharSequence label, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull kotlin.Pair... parameters)
Creates an Option Quick Reply without description
@NotNull public static <T extends Bus<T>> Option option(@NotNull T $this$option, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence description, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
Creates an Option Quick Reply
@NotNull public static <T extends Bus<T>> OptionWithoutDescription option(@NotNull T $this$option, @NotNull java.lang.CharSequence label, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
Creates an Option Quick Reply without description
@NotNull public static OptionWithoutDescription nlpOption(@NotNull ai.tock.bot.engine.I18nTranslator $this$nlpOption, @NotNull java.lang.CharSequence label)
Creates a NLP Option Quick Reply without description
@NotNull public static Option nlpOption(@NotNull ai.tock.bot.engine.I18nTranslator $this$nlpOption, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence description)
Creates a NLP Option Quick Reply without description
@NotNull
public static ai.tock.bot.engine.BotBus withTwitter(@NotNull
ai.tock.bot.engine.BotBus $this$withTwitter,
@NotNull
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.TwitterConnectorMessage> messageProvider)
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.
@NotNull
public static ai.tock.bot.engine.BotBus withTwitter(@NotNull
ai.tock.bot.engine.BotBus $this$withTwitter,
@NotNull
java.lang.String connectorId,
@NotNull
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.TwitterConnectorMessage> messageProvider)
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.
connectorId,
T:BusT.send,
T:BusT.end@NotNull
public static ai.tock.bot.engine.BotBus withPublicTwitter(@NotNull
ai.tock.bot.engine.BotBus $this$withPublicTwitter,
@NotNull
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.TwitterPublicConnectorMessage> messageProvider)
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.
public static void endIfPublicTwitter(@NotNull
ai.tock.bot.engine.BotBus $this$endIfPublicTwitter)
End the conversation only if the visibility is public
@NotNull public static Tweet tweet(@NotNull ai.tock.bot.engine.BotBus $this$tweet, @NotNull java.lang.CharSequence message)
Create a tweet
@NotNull public static Tweet tweetWithInviteForDM(@NotNull ai.tock.bot.engine.BotBus $this$tweetWithInviteForDM, @NotNull java.lang.CharSequence message, @Nullable java.lang.String welcomeMessageID, @Nullable java.lang.String defaultMessage)
Create a tweet with a link for DM to the account listened