telebot icon indicating copy to clipboard operation
telebot copied to clipboard

Webhook support

Open bemyak opened this issue 8 years ago • 3 comments

It would be very nice if telebot had support of webhooks. If you're writing telegram bot on Rust than you probably expect extreamly high performance and "pull" method is something opposite to it :)

bemyak avatar Dec 19 '17 19:12 bemyak

The pull method is supposed to be long polling, so the performance shouldn't be that terrible.

That said, if you want to scale beyond a single process polling, I suspect the webhooks method is probably the way to go.

tecywiz121 avatar Dec 20 '17 15:12 tecywiz121

The library did not used long polling up to this point, but I added support in 6a632d72afd6d3a4a97f9ec5c61781e7f838c4b4 and telebot will now wait 30s before it sends a new request. Nevertheless it would be nice to support webhooks. But first we need to switch the underlying infrastructure from cURL to hyper to have server support and then extend the Bot struct to host a server. #21

bytesnake avatar Dec 21 '17 09:12 bytesnake

This is blocked until a library for multiform server AND client support is published. The best candidate ist https://github.com/abonander/multipart-async, but it has no client support yet.

bytesnake avatar Jan 03 '18 21:01 bytesnake