MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / delete_webhook

Method delete_webhook

telebot/__init__.py:584–601  ·  view source on GitHub ↗

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. Telegram documentation: https://core.telegram.org/bots/api#deletewebhook :param drop_pending_updates: Pass True to drop all pending updates, defaults

(self, drop_pending_updates: Optional[bool]=None, timeout: Optional[int]=None)

Source from the content-addressed store, hash-verified

582
583
584 def delete_webhook(self, drop_pending_updates: Optional[bool]=None, timeout: Optional[int]=None) -> bool:
585 """
586 Use this method to remove webhook integration if you decide to switch back to getUpdates.
587 Returns True on success.
588
589 Telegram documentation: https://core.telegram.org/bots/api#deletewebhook
590
591 :param drop_pending_updates: Pass True to drop all pending updates, defaults to None
592 :type drop_pending_updates: :obj: `bool`, optional
593
594 :param timeout: Request connection timeout, defaults to None
595 :type timeout: :obj:`int`, optional
596
597 :return: Returns True on success.
598 :rtype: :obj:`bool`
599 """
600 return apihelper.delete_webhook(
601 self.token, drop_pending_updates=drop_pending_updates, timeout=timeout)
602
603
604 def get_webhook_info(self, timeout: Optional[int]=None) -> types.WebhookInfo:

Callers 3

add_botFunction · 0.95
main.pyFile · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected