mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 14:55:12 +00:00
Add Client.stop_transmission() method
As a wrapper for raise StopTransmission
This commit is contained in:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user