Closed ghost closed 6 years ago
It's not clear what you want to achieve. Using the webhook you receive a call for each message every user send. The username is in the message object. If you need some complex interation, you have to save the conversation state somewhere (db, file etc.)
how can i access to first $telegram->Text() always (every time) from strat conversation untill end of conversation ?
That is it.
You can't. You need to save on a database the first message a user sends by yourself and implement the conversation logic.
yes I knew that way, but i like to fetch first $telegram->Text() without using database, because of database will be busy during chat, I wanted to use query string with start chat till end of chatting if possible.
of course I must tell you that I used Session for saving username when the chat start first with this url:
https://telegram.me/myBot?start=username
but I couldn`t keep it after second message up to the end.
I don't think it's possible, the query parameter exist only in the first message
Thanks dear Gabriele if I can solve it, i will share it.
Hello, at first thanks for this library ...
i want to get first message text during conversation while when i use Webhook it send me last message array, in addition last message i want to get first message.
in fact i want to detect every username as https://telegram.me/myBot?start=username during conversation between all of users and response them according their username
Thanks