Answer the question
In order to leave comments, you need to log in
How to make a command with data for tg bot in php?
Hello!
I'm trying to make a command for the bot in pure php, something like /say @username param1 param2
after entering which the bot should send a message: @username textpar1 and textpar2
but in theory I don't understand how to implement it, I didn't find examples of commands with parameters at all. What methods to use? Thanks in advance for your time.
Answer the question
In order to leave comments, you need to log in
The message has a text attribute. You break the text by spaces, it turns out ['/say', '@username', 'param1', 'param2'], and then you can think of something yourself))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question