From c2c93f5d5177cfc969f6351513cbc1a4b2c9b9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Mon, 16 Jan 2017 00:00:54 +0100 Subject: [PATCH] webhookinfo.py: add new parameters --- telegram/webhookinfo.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/telegram/webhookinfo.py b/telegram/webhookinfo.py index d25acfea1..e5b0605dc 100644 --- a/telegram/webhookinfo.py +++ b/telegram/webhookinfo.py @@ -40,13 +40,23 @@ class WebhookInfo(TelegramObject): """ - def __init__(self, url, has_custom_certificate, pending_update_count, **kwargs): + def __init__(self, + url, + has_custom_certificate=None, + pending_update_count=None, + last_error_date=None, + last_error_message=None, + max_connections=None, + allowed_updates=None, + **kwargs): # Required self.url = url self.has_custom_certificate = has_custom_certificate self.pending_update_count = pending_update_count - self.last_error_date = kwargs.get('last_error_date', '') - self.last_error_message = kwargs.get('last_error_message', '') + self.last_error_date = last_error_date + self.last_error_message = last_error_message + self.max_connections = max_connections + self.allowed_updates = allowed_updates @staticmethod def de_json(data, bot):