This example demonstrates a Telegram Bot that respond to Inline Queries.
It's a simple "Knowledge Base" bot that will list the articles whose names starts with the letters specified by the user.
When the user select an article from the resulting list, the content of the article (formatted with HTML) is posted
and the bot may tell which article was selected.
- .NET 6 and Telegram.Bot v21.3
- You need to set your bot token in the
TOKENenvironment variable (in launchSettings.json or via Project Properties > Debug > General) - You need to enable "Inline mode on" in BotFather for this bot to work.
- If you want the bot to tell which article was selected by the user, you need to enable "Inline feedback" (for example: 100%)