mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04: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:
|
else:
|
||||||
self.dispatcher.remove_handler(handler, group)
|
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):
|
def authorize_bot(self):
|
||||||
try:
|
try:
|
||||||
r = self.send(
|
r = self.send(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue