go-telegram-bot-api / telegram-bot-api

Golang bindings for the Telegram Bot API
https://go-telegram-bot-api.dev
MIT License
5.58k stars 863 forks source link

Missing deleteWebhook method #656

Open Pawilonek opened 1 year ago

Pawilonek commented 1 year ago

I found that removing the webhook URL from a bot was available (see: commit and #246) but later removed during some refactoring: commit. I tested this API call like this:

_, err = bot.MakeRequest("deleteWebhook", tgbotapi.Params{})

It still works fine and removed my webhook.

Is there any reason why this method is gone? Or, it was just a mistake? In the second case, I would be happy to make a PR with a fix.

agrogov commented 1 year ago

will delete webhook as well: w, err := tgbotapi.NewWebhook("") if err != nil { log.Fatal(err) } _, err = bot.Request(w) if err != nil { log.Fatal(err) }

fardeadok commented 1 week ago

http.Get("https://api.telegram.org/bot" + token + "/deleteWebhook")