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

Get webhook info

https://core.telegram.org/bots/api#getwebhookinfo
This commit is contained in:
Alex Root Junior
2016-10-20 10:52:38 +03:00
parent cd89de5a9a
commit 702763edd6
3 changed files with 33 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ class TeleBot:
def set_webhook(self, url=None, certificate=None):
return apihelper.set_webhook(self.token, url, certificate)
def get_webhook_info(self):
result = apihelper.get_webhook_info(self.token)
return types.WebhookInfo.de_json(result)
def remove_webhook(self):
return self.set_webhook() # No params resets webhook