API reference¶
-
class
Messenger
()¶ Messenger
-
Messenger.
pageSend
(pageId, recipientId, responseMessage)¶ Send a response to a user at a page. You probably want to use
Response.reply()
insteadArguments: - pageId (string) – Page ID
- recipientId (string) – Recipient ID
- responseMessage (Object) – The response message to send back
Returns: Promise – A promise for sending the response
-
Messenger.
send
(recipientId, responseMessage)¶ Send a response to the default page
Deprecated since version 1.4.0: Use
Response.reply()
insteadArguments: - recipientId (number) – Recipient ID
- responseMessage (Object) – The response message to send back
Returns: Promise – A promise for sending the response
-
Messenger.
start
()¶ Start the web server and listen for messages
Returns: void –
-