tock / ai.tock.bot.connector.messenger / MessengerConnector / sendEvent

# sendEvent

`fun sendEvent(event: Event, transformMessageRequest: (MessageRequest) -> MessageRequest = { it }, postMessage: (String) -> Unit = {}, transformActionRequest: (ActionRequest) -> ActionRequest = { it }, errorListener: (Throwable) -> Unit = {}): SendResponse?` (source)

Send an action to messenger.

### Parameters

`event` - the action to send

`transformMessageRequest` - method to transform the MessageRequest before sending - default is identity

`postMessage` - method (with token parameter) launched after successful MessageRequest call - default do nothing

`transformActionRequest` - method to transform the ActionRequest before sending - default is identity