mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Simplify the workflow with UpdateState exposing a single flag param
This commit is contained in:
@@ -58,8 +58,7 @@ class TelegramBareClient:
|
||||
def __init__(self, session, api_id, api_hash,
|
||||
connection_mode=ConnectionMode.TCP_FULL,
|
||||
proxy=None,
|
||||
enable_updates=False,
|
||||
active_updates_polling=False,
|
||||
process_updates=False,
|
||||
timeout=timedelta(seconds=5)):
|
||||
"""Initializes the Telegram client with the specified API ID and Hash.
|
||||
Session must always be a Session instance, and an optional proxy
|
||||
@@ -80,7 +79,7 @@ class TelegramBareClient:
|
||||
|
||||
# This member will process updates if enabled.
|
||||
# One may change self.updates.enabled at any later point.
|
||||
self.updates = UpdateState(enable_updates, active_updates_polling)
|
||||
self.updates = UpdateState(process_updates)
|
||||
|
||||
# These will be set later
|
||||
self.dc_options = None
|
||||
|
Reference in New Issue
Block a user