TelegramBots / Telegram.Bot.Examples

Examples for the Telegram.Bot C# Library
MIT License
630 stars 289 forks source link

How use it... #439

Closed LucioMenci closed 1 year ago

LucioMenci commented 1 year ago

Hi, I'm interested to being able to use inline queries. My use is to have the procedure looking for the price of an item by searching for it on a DB. The program would reside on a server that is enabled to have an open port on the internet.

I think I figured out how to act to modify the program to have the use I want. I think I figured out how to create the new bot, and direct it to handle requests to my service. But I didn't understand how I can tell the InlineQueries solution to listen on a specific port. Can you explain me? Is the service a client of Telegram, and does it request a connection to the server and remain to listen on that connection until an user ask something to the bot? Can this connection remain open for days without any request? It seems so strange.

Thank you.

Fedorus commented 1 year ago

I think here you can find explanation: https://telegrambots.github.io/book/3/updates/index.html

karb0f0s commented 1 year ago

Please follow issue template If you want to chat, feel free to join our group.

LucioMenci commented 1 year ago

Ok. My machine is enabled to be open, but I haven't a domain name, build a certificate «could be complex and a long ride». I think that I will use the polling method, the one with «getUpdates». Why in your source there is no «getUpdates» method claim?

Fedorus commented 1 year ago

StartReceiving.. from polling example using it under the hood, method itself is available in the library.