mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Add Client.stop_transmission() method
As a wrapper for raise StopTransmission
This commit is contained in:
parent
c28b9f9a2c
commit
6b63e88de7
1 changed files with 6 additions and 0 deletions
|
|
@ -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 a new issue