Reputation: 1082
im developing an app in C#.net WinForm which includes telegram_bot :). telegram bot api offers getUpdates and webhook ...since my bot should be responsive to messages i need a method that app could distinguish the last updates which are not responded.
getupdates is polling method and gives all updates .... i tried to use infinity loop over the json result bot it seems creepy and hangy.
webhook is a method i need which always notifies me about the new coming updates and app can easily distinguish the new updates and can respond ....BUT my app is Winform not web and webhook needs URL :( ...
could you help me to overcome to this issue......thank you
Upvotes: 1
Views: 2299
Reputation: 2764
I had same problem about two years ago when telegram first introduced the bot api. i could solve it with service base architecture. at first i created web api project and handled or incoming bot requests with simple web hook. then i created another services like:
finally i created a win form in order to consume my services. i hope this could solve your problem too.
Upvotes: 1