add webhook handler without http.Serve
I would like to be able to have a webhook handler that has no runtime. I have added an implementation of such a handler, it can be easily routed to an existing router without creating another listener.
@robotomize Do you think this is going to help with running the webhook handler within the lambda function, which does not really allow you to listen to a port?
I like the idea but not the implementation. Wouldn't want to spawn another Webhook entity with a pretty similar logic. I'd better extend the existing implementation. I'll think about it.
@demget I agree, I sketched out a solution so as not to change anything in the current implementation and configuration. Cool if you make a better and more elegant solution!
Wouldn't want to spawn another Webhook entity with a pretty similar logic. I'd better extend the existing implementation.
Agree, no polling necessary. As comment in #536, for Webhook, as far as AWS lambda is concerned, what we need is merely to use bot.HandleUpdate to do the same internal stuff the library is doing from the webhook to handle a single update.
Can you do what is described here? It is working for me to deploy the code to AWS Lambda with just mapping the lambda request to the Update structure.
Can you do what is described here? It is working for me to deploy the code to AWS Lambda with just mapping the lambda request to the Update structure.
The provided example that goes with the PR is somehow removed later on (maybe the concern was that it was outdated after V3). Anyway,
Would you be so kind as to give a working demo example for the current version please?
The example was removed, but It actually works.
In any case, here is a working example https://github.com/tucnak/telebot/pull/617
Since the provided example above makes more sense to me, closing this PR.