deleteWebhook¶
Returns: bool
- class aiogram.methods.delete_webhook.DeleteWebhook(*, drop_pending_updates: bool | None = None, **extra_data: Any)[source]¶
Use this method to remove webhook integration if you decide to switch back to
aiogram.methods.get_updates.GetUpdates
. ReturnsTrue
on success.Source: https://core.telegram.org/bots/api#deletewebhook
- drop_pending_updates: bool | None¶
Pass
True
to drop all pending updates
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
Usage¶
As bot method¶
result: bool = await bot.delete_webhook(...)
Method as object¶
Imports:
from aiogram.methods.delete_webhook import DeleteWebhook
alias:
from aiogram.methods import DeleteWebhook
With specific bot¶
result: bool = await bot(DeleteWebhook(...))
As reply into Webhook in handler¶
return DeleteWebhook(...)