mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
18 lines
537 B
Python
18 lines
537 B
Python
from typing import Any, Dict
|
|
|
|
from .base import Request, TelegramMethod
|
|
|
|
|
|
class DeleteWebhook(TelegramMethod[bool]):
|
|
"""
|
|
Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. Requires no parameters.
|
|
|
|
Source: https://core.telegram.org/bots/api#deletewebhook
|
|
"""
|
|
|
|
__returning__ = bool
|
|
|
|
def build_request(self) -> Request:
|
|
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
|
|
|
return Request(method="deleteWebhook", data=data)
|