I never actually tried this out, but I think it or something like it should work based on the docs found here: https://telegram-bot-sdk.readme.io/reference/removewebhook

Readme
1
2
3
4
5
6
7
import { telegramSetWebhook } from "https://esm.town/v/stevekrouse/telegramSetWebhook";
console.log(
await telegramSetWebhook(Deno.env.get("telegramBotToken"), {
remove: true,
}),
);
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.