Hello. I use the python telegram bot library. Through the / ls command, I pass two arguments to the php script, and display the result of the script execution in the message. What you need to do to send arguments without the / ls command. Or, for example, when choosing the / start command, the bot waited for when I send him arguments?
Here is some code
def ls(bot, update, args): chat = update.message.chat_id arg = ' '.join(x for x in args) result = run_command(«/usr/bin/php7.2 /home/***/bot/test.php «+arg) bot.sendMessage(chat_id=chat, text=textoutput) ls_handler = CommandHandler('ls', ls, pass_args=True) dispatcher.add_handler(ls_handler)