Supabase Edge Functions is ideal for most simple bots, and you should note that not all Deno features are available for apps running on Supabase Edge Functions. For example, there is no file system on Supabase Edge Functions. It’s just like the other many serverless platforms, but dedicated for Deno apps.
You can now deploy your bot to Supabase. Note that you will have to disable JWT authorization because Telegram uses a different way to make sure the requests are coming from Telegram. You can deploy the function using this command.
Next, you need to give your bot token to Supabase so that your code has access to it as an environment variable.
# Replace 123:aBcDeF-gh with your real bot token.supabasesecretssetBOT_TOKEN=123:aBcDeF-gh
Your Supabase Function is now working. All that’s left to do is to tell Telegram where to send the updates. You can do this by calling setWebhook. For example, open a new tab in your browser and visit this URL: