Methods
(inner) conversationSwitch(response, conversation, callback) → {function}
Handle breaks in the currently running conversation
- Source:
Parameters:
Name | Type | Description |
---|---|---|
response |
object
|
the response object |
conversation |
object
|
the conversation object |
callback |
function
|
default function to call |
Returns:
- Type:
-
function
the function to direct the conversation
(inner) goto(threadName) → {function}
Which conversation thread to go to
- Source:
Parameters:
Name | Type | Description |
---|---|---|
threadName |
string
|
the name of the thread to go to next |
Returns:
- Type:
-
function
result of calling conversationSwitch with the threadName
(inner) nextConversation(response, conversation) → {function}
Go to the next conversation.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
response |
object
|
the response object |
conversation |
object
|
the conversation object |
Returns:
- Type:
-
function
calling converationSwitch with conversation.next()
(inner) sendMessage(bot, facebookId, messageCallback)
Send a message to a facebookId, they have to have opted in
- Source:
Parameters:
Name | Type | Description |
---|---|---|
bot |
object
|
a bot returned from calling |
facebookId |
string
|
messenger id |
messageCallback |
function
|
callback to pass to startConversation |