Add Client.stop_transmission() method

As a wrapper for raise StopTransmission
This commit is contained in:
Dan 2019-01-11 14:02:40 +01:00
parent c28b9f9a2c
commit 6b63e88de7

View File

@ -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(