1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Add delete webhook.

This commit is contained in:
eternnoir
2016-12-06 11:52:16 +08:00
parent eadff07f79
commit a06551daaf
2 changed files with 12 additions and 0 deletions

View File

@@ -80,6 +80,13 @@ class TeleBot:
def set_webhook(self, url=None, certificate=None, max_connections=None, allowed_updates=None):
return apihelper.set_webhook(self.token, url, certificate, max_connections, allowed_updates)
def delete_webhook(self):
"""
Use this method to remove webhook integration if you decide to switch back to getUpdates.
:return: bool
"""
return apihelper.delete_webhook(self.token)
def get_webhook_info(self):
result = apihelper.get_webhook_info(self.token)
return types.WebhookInfo.de_json(result)