So I've built a Telegram bot, which can receive the following commands:
/list
/info 123
This works great, as I can catch /info
and pass the additional arguments as ints. But, sadly, the Telegram clients don't see /info 123
as a complete command, but just the /info
part. Is there a way to make it recognize the entirety of the command as the command?
I've tried Markdown-ing it: [/info 123](/info 123)
, but no joy. Is this possible?
Bot does not work in Web Chat There could be a number of reasons why a bot doesn't work. Most likely, the bot application is down and cannot receive messages, or the bot receives the messages but fails to respond. Here are some of the possible causes: The bot is down and cannot be reached.
I've reached out to @BotSupport with the same question, and he/they/it responded swiftly with the following answer:
Hi, at the moment it is not possible to highlight parameters of a command. I any case, you may can find a workaround if you use correct custom keyboards ;) — @BotSupport
Custom keyboards may be an option for someone, but not for me. The solution I've gone for is to give the command as /info123
. As the bot receives all /
commands, I check if the received command starts with info
, and if so, I remove the info
part. I convert the remaining string/int to arguments, and pass that along to the relevant command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With