Skip to content

Instantly share code, notes, and snippets.

@anchetaWern
Created July 11, 2019 05:21
Show Gist options
  • Select an option

  • Save anchetaWern/4f96f9c4735e43781cc2edb6fab27457 to your computer and use it in GitHub Desktop.

Select an option

Save anchetaWern/4f96f9c4735e43781cc2edb6fab27457 to your computer and use it in GitHub Desktop.
Pokedex Bot: onSend in App.js
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