Closed 88hichem88 closed 3 years ago
I'll look into it. Meanwhile, you can create this method yourself. You just need to add a message to the messages array with the type "user".
In the actionprovider:
createClientMesssage = (message) => {
const clientMessage = {
message: message,
type: "user",
id: somethingUnique
}
return clientMessage
}
setClientMessage = (message) => {
this.setState(prevState => ({
...prevState, messages: [...prevState.messages, clientMessage]
}))
}
Then:
// inside function
const clientMessage = this.createClientMessage("I'm looking for this item")
this.setClientMessage(message)
Thanks a lot. I'm already developing my first bot with the chat-bot-kit and so far it's amazing. Wish you great success.
In the action provider Please add a new function similar to this.createChatBotMessage("");
That allow to create a client message
this.createClientMessage("");
To display the text in the button clicked on So the client feel like he said something ( when he clicked on the button )