mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Add Client.stop_transmission() method
As a wrapper for raise StopTransmission
This commit is contained in:
parent
c28b9f9a2c
commit
6b63e88de7
@ -460,6 +460,12 @@ class Client(Methods, BaseClient):
|
||||
else:
|
||||
self.dispatcher.remove_handler(handler, group)
|
||||
|
||||
def stop_transmission(self):
|
||||
"""Use this method to stop downloading or uploading a file.
|
||||
Must be called inside a progress callback function.
|
||||
"""
|
||||
raise Client.StopTransmission
|
||||
|
||||
def authorize_bot(self):
|
||||
try:
|
||||
r = self.send(
|
||||
|
Loading…
Reference in New Issue
Block a user