mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 04:48:06 +00:00
Accommodate Syncer
This commit is contained in:
parent
b84628e01d
commit
9631dc7780
@ -51,6 +51,7 @@ from pyrogram.session.internals import MsgId
|
||||
from . import utils
|
||||
from .input_media import InputMedia
|
||||
from .style import Markdown, HTML
|
||||
from .syncer import Syncer
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -232,6 +233,7 @@ class Client:
|
||||
Thread(target=self.download_worker, name="DownloadWorker#{}".format(i + 1)).start()
|
||||
|
||||
mimetypes.init()
|
||||
Syncer.add(self)
|
||||
|
||||
def stop(self):
|
||||
"""Use this method to manually stop the Client.
|
||||
@ -252,6 +254,8 @@ class Client:
|
||||
for _ in range(self.DOWNLOAD_WORKERS):
|
||||
self.download_queue.put(None)
|
||||
|
||||
Syncer.remove(self)
|
||||
|
||||
def authorize_bot(self):
|
||||
try:
|
||||
r = self.send(
|
||||
|
Loading…
x
Reference in New Issue
Block a user