Someone requests to join my private Telegram channel. A bot sends them a PDF in a private message, then approves the request. The part I like about this setup: I don't have a separate server running for the bot. It uses a Supabase Edge Function on the Free plan.
The code is open source: telegram-file-bot on GitHub . Here's how the webhook, file delivery, and approval fit together, and what the free setup does not solve.
Why an Edge Function?
A traditional polling bot repeatedly asks Telegram for updates. This bot uses a webhook: Telegram sends an HTTPS request when a relevant update arrives.β¦