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 stringimage -> ImagequickReplies -> Suggestionscard -> BasicCardsimpleResponses -> SimpleResponse[]basicCard -> BasicCardsuggestions -> SuggestionslinkOutSuggestion -> LinkOutSuggestionlistSelect -> ListcarouselSelect -> Carouselpayload -> typeof objectDialogflow v1:
0 (text) -> typeof string3 (image) -> Image1 (card) -> BasicCard2 (quick replies) -> Suggestions4 (custom payload) -> typeof objectsimple_response -> SimpleResponsebasic_card -> BasicCardlist_card -> Listsuggestion_chips -> Suggestionscarousel_card -> Carousellink_out_chip -> LinkOutSuggestioncustom_payload -> typeof objectOnly 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 stringimage -> ImagequickReplies -> Suggestionscard -> BasicCardsimpleResponses -> SimpleResponse[]basicCard -> BasicCardsuggestions -> SuggestionslinkOutSuggestion -> LinkOutSuggestionlistSelect -> ListcarouselSelect -> Carouselpayload -> typeof objectDialogflow v1:
0 (text) -> typeof string3 (image) -> Image1 (card) -> BasicCard2 (quick replies) -> Suggestions4 (custom payload) -> typeof objectsimple_response -> SimpleResponsebasic_card -> BasicCardlist_card -> Listsuggestion_chips -> Suggestionscarousel_card -> Carousellink_out_chip -> LinkOutSuggestioncustom_payload -> typeof objectA 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) }