Send data to handleChatMessage() #669
-
How to send data with a message from a user in a chat and intercept it in handleChatMessage()? I ask the user to enter a number Next, I intercept the text in handleChatMessage() Can you tell me how to send other data together and get it from handleChatMessage()? When I receive in handleChatMessage(), the data contains only the entered text |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi, just reply form the handle chat message method $this->reply("hello"); And listen for the response inside handle chat message For conversations you should better keep track of the conversation state, using telegraph storage or a custom implementation |
Beta Was this translation helpful? Give feedback.
-
And if I need to pass 2 or more parameters? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer! But? i didn't quite understand how to use $this->reply("hello") in handleChatMessage()? |
Beta Was this translation helpful? Give feedback.
-
Reply does not use any payload of the received message |
Beta Was this translation helpful? Give feedback.
Reply does not use any payload of the received message