I want to make a telegram bot about algebra. I need to send code to http://api.mathjs.org/v4/?expr=2*(7-3) after the expr part. I want to send numbers with inline query, but how can I do it?
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
2
Answers
You can find multiple examples of Telegraf usage at https://github.com/telegraf/telegraf/tree/develop/docs/examples
Here is an example of a bot utilizing an inline query
The original example uses context object deconstruction, which doesn’t seem to work and spits out error:
TypeError: Cannot read property 'assert' of undefined
Here is the code without object deconstruction, which works for me (I’ve made it superfluously verbose for better understanding ):
Here is the article that helped me to solve this problem.