abstract class PostbackHandler extends BaseHandler (View source)

Class PostbackHandler

Properties

protected Bot $bot from BaseHandler
protected string $payload

Methods

$this
createBot($token)

Create bot to send API

$this
debug($debug)

No description

send(Message $message)

Send message to api

mixed
handle(ReceiveMessage $message)

Handle the chatbot message

mixed
getPayload()

Get payload

Details

$this createBot($token)

Create bot to send API

Parameters

$token

Return Value

$this

$this debug($debug)

Parameters

$debug

Return Value

$this

HandleMessageResponse send(Message $message)

Send message to api

Parameters

Message $message

Return Value

HandleMessageResponse

Exceptions

NotCreateBotException

abstract mixed handle(ReceiveMessage $message)

Handle the chatbot message

Parameters

ReceiveMessage $message

Return Value

mixed

mixed getPayload()

Get payload

Return Value

mixed