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)
| 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: |