mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added max_connections and allowed updates to WebhookInfo
This commit is contained in:
parent
c168feea32
commit
12e7879325
@ -144,14 +144,20 @@ class WebhookInfo(JsonDeserializable):
|
|||||||
last_error_date = obj['last_error_date']
|
last_error_date = obj['last_error_date']
|
||||||
if 'last_error_message' in obj:
|
if 'last_error_message' in obj:
|
||||||
last_error_message = obj['last_error_message']
|
last_error_message = obj['last_error_message']
|
||||||
return cls(url, has_custom_certificate, pending_update_count, last_error_date, last_error_message)
|
if 'max_connections' in obj:
|
||||||
|
max_connections = obj['max_connections']
|
||||||
|
if 'allowed_updates' in obj:
|
||||||
|
allowed_updates = obj['allowed_updates']
|
||||||
|
return cls(url, has_custom_certificate, pending_update_count, last_error_date, last_error_message, max_connections, allowed_updates)
|
||||||
|
|
||||||
def __init__(self, url, has_custom_certificate, pending_update_count, last_error_date, last_error_message):
|
def __init__(self, url, has_custom_certificate, pending_update_count, last_error_date, last_error_message, max_connections, allowed_updates):
|
||||||
self.url = url
|
self.url = url
|
||||||
self.has_custom_certificate = has_custom_certificate
|
self.has_custom_certificate = has_custom_certificate
|
||||||
self.pending_update_count = pending_update_count
|
self.pending_update_count = pending_update_count
|
||||||
self.last_error_date = last_error_date
|
self.last_error_date = last_error_date
|
||||||
self.last_error_message = last_error_message
|
self.last_error_message = last_error_message
|
||||||
|
self.max_connections = max_connections
|
||||||
|
self.allowed_updates = allowed_updates
|
||||||
|
|
||||||
|
|
||||||
class User(JsonDeserializable):
|
class User(JsonDeserializable):
|
||||||
|
Loading…
Reference in New Issue
Block a user