and I can't find anything about using more methods (i.e.: sendMessage) or using the same method many times for each request while using webhook
Can you help me?
I don't know if I wrote bad my code or if the bot can't use many methods for each request with webhook
For example, if a user writes "/ start", can my bot sends back 2 or more messages?
how does your code look like?
yes, you can
At the moment it can just tell you if you are in my database or not and if not it will write id, nick, name and lastname on the db
can you show your code? part where you're trying to send the message
what programming language do you use?
Not at the moment, my password is in my pc and i can't use it right now Anyway, it sends sendMessage method using header() I wrote it in php
By webhook url the bot can't reply to user You need to use api send message For automatic reply by bot if someone send /start you need to make a script and host it on heroku or something else
Of course i have to use sendMessage method and I'm hosting the bot in a free server (low quality but it's perfect for testing and learning) At the moment, if you start the bot it send you a message and write some stuff on my database, but at the moment the bot can't send 2 or more messages for each command/message
Actually sending msg has nothing to do with user sending u msg (as long as they started the bot before, otherwise u can still send the msg but they wont receive it, and besides that in order to your code gets triggered/run it needs some update such as user msg so TG calls ur webhook) u can just send a msg using ur browser to a chat given this, in ur method, whenever user sent u /start u just make 2 GET request to the sendMessage API method
Обсуждают сегодня