Created
July 11, 2019 05:21
-
-
Save anchetaWern/4f96f9c4735e43781cc2edb6fab27457 to your computer and use it in GitHub Desktop.
Pokedex Bot: onSend in App.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onSend(messages = []) { | |
| this.setState(previousState => ({ | |
| messages: GiftedChat.append(previousState.messages, messages) | |
| })); | |
| let message = messages[0].text; | |
| Dialogflow_V2.requestQuery( | |
| message, | |
| result => this.handleResponse(result), | |
| error => console.log(error) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment