tock / ai.tock.bot.connector.slack / SlackConnector

SlackConnector

class SlackConnector : ConnectorBase (source)

Constructors

<init>

SlackConnector(applicationId: String, path: String, outToken1: String, outToken2: String, outToken3: String, client: SlackClient)

Properties

applicationId

val applicationId: String

client

val client: SlackClient

outToken1

val outToken1: String

outToken2

val outToken2: String

outToken3

val outToken3: String

path

val path: String

Functions

addSuggestions

Returns a ConnectorMessage with the specified list of suggestions. If the connector does not support suggestions, returns null.

fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?

Updates a ConnectorMessage with the specified list of suggestions. Default returns message unmodified.

fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?

register

Registers the connector for the specified controller.

fun register(controller: ConnectorController): Unit

send

Send an event with this connector for the specified delay.

fun send(event: Event, callback: ConnectorCallback, delayInMs: Long): Unit

toConnectorMessage

Maps a MediaMessage into a ConnectorMessage. If toConnectorMessage returns an empty list, the mapping is not supported for this connector. Default returns an empty list.

fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>