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

Added webhooks support with set_webhook and remove_webhook in the TeleBot class

This commit is contained in:
pieter
2015-09-18 20:12:53 +02:00
parent 7a08102fad
commit 941b8ac5d0
3 changed files with 23 additions and 0 deletions

View File

@ -68,6 +68,12 @@ class TeleBot:
if self.__create_threads:
self.worker_pool = util.ThreadPool(num_threads)
def set_webhook(self, url=None, certificate=None):
return apihelper.set_webhook(self.token, url, certificate)
def remove_webhook(self):
return self.set_webhook() # No params resets webhook
def get_updates(self, offset=None, limit=None, timeout=20):
"""
Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.