Gets the first Dialogflow incoming message with the given type. Messages are converted into client library class instances or a string.
Only messages with the platform field unlabeled (for generic use)
or labeled ACTIONS_ON_GOOGLE
(google
in v1) will be converted and read.
The conversation is detailed below for a specific message oneof:
text
-> typeof string
image
-> Image
quickReplies
-> Suggestions
card
-> BasicCard
simpleResponses
-> SimpleResponse[]
basicCard
-> BasicCard
suggestions
-> Suggestions
linkOutSuggestion
-> LinkOutSuggestion
listSelect
-> List
carouselSelect
-> Carousel
payload
-> typeof object
Dialogflow v1:
0
(text) -> typeof string
3
(image) -> Image
1
(card) -> BasicCard
2
(quick replies) -> Suggestions
4
(custom payload) -> typeof object
simple_response
-> SimpleResponse
basic_card
-> BasicCard
list_card
-> List
suggestion_chips
-> Suggestions
carousel_card
-> Carousel
link_out_chip
-> LinkOutSuggestion
custom_payload
-> typeof object
Only messages with the platform field unlabeled (for generic use)
or labeled ACTIONS_ON_GOOGLE
(google
in v1) will be converted and read.
The conversation is detailed below for a specific message oneof:
text
-> typeof string
image
-> Image
quickReplies
-> Suggestions
card
-> BasicCard
simpleResponses
-> SimpleResponse[]
basicCard
-> BasicCard
suggestions
-> Suggestions
linkOutSuggestion
-> LinkOutSuggestion
listSelect
-> List
carouselSelect
-> Carousel
payload
-> typeof object
Dialogflow v1:
0
(text) -> typeof string
3
(image) -> Image
1
(card) -> BasicCard
2
(quick replies) -> Suggestions
4
(custom payload) -> typeof object
simple_response
-> SimpleResponse
basic_card
-> BasicCard
list_card
-> List
suggestion_chips
-> Suggestions
carousel_card
-> Carousel
link_out_chip
-> LinkOutSuggestion
custom_payload
-> typeof object
A string checking for the typeof message or a class checking for instanceof message
Generated using TypeDoc
Gets the Dialogflow incoming messages as an iterator. Messages are converted into client library class instances or a string. See {@link Incoming#get|conv.incoming.get} for details on how the conversion works.
// Dialogflow const app = dialogflow() // Create messages in the Dialogflow Console Intent Responses section app.intent('Default Welcome Intent', conv => { const messages = [...conv.incoming] // do something with the messages // or just spread them out back to the user conv.ask(`Here's what was set in the Dialogflow console`) conv.ask(...conv.incoming) }