K
K
k0smos2020-09-21 22:50:41
PHP
k0smos, 2020-09-21 22:50:41

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 param2after entering which the bot should send a message: @username textpar1 and textpar2but 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

1 answer(s)
Y
youngtitanium, 2020-09-21
@k0smos

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 question

Ask a Question

731 491 924 answers to any question