abstract class PostbackHandler extends BaseHandler (View source)

Class PostbackHandler

Properties

protected Bot $bot from BaseHandler
protected string $payload

Methods

$this
createBot($token, $secret = null)

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, $secret = null)

Create bot to send API

Parameters

$token
$secret

Return Value

$this

$this debug($debug)

Parameters

$debug

Return Value

$this

HandleMessageResponse|array send(Message $message)

Send message to api

Parameters

Message $message

Return Value

HandleMessageResponse|array

Exceptions

NotCreateBotException

abstract mixed handle(ReceiveMessage $message)

Handle the chatbot message

Parameters

ReceiveMessage $message

Return Value

mixed

mixed getPayload()

Get payload

Return Value

mixed