mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 14:55:12 +00:00
Merge branch 'master' into docs
This commit is contained in:
@@ -20,10 +20,11 @@
|
|||||||
class InputMedia:
|
class InputMedia:
|
||||||
class Photo:
|
class Photo:
|
||||||
"""This object represents a photo to be sent inside an album.
|
"""This object represents a photo to be sent inside an album.
|
||||||
|
It is intended to be used with :obj:`pyrogram.Client.send_media_group`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
media (:obj:`str`):
|
media (:obj:`str`):
|
||||||
File to send.
|
Photo file to send.
|
||||||
Pass a file path as string to send a photo that exists on your local machine.
|
Pass a file path as string to send a photo that exists on your local machine.
|
||||||
|
|
||||||
caption (:obj:`str`):
|
caption (:obj:`str`):
|
||||||
@@ -45,10 +46,11 @@ class InputMedia:
|
|||||||
|
|
||||||
class Video:
|
class Video:
|
||||||
"""This object represents a video to be sent inside an album.
|
"""This object represents a video to be sent inside an album.
|
||||||
|
It is intended to be used with :obj:`pyrogram.Client.send_media_group`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
media (:obj:`str`):
|
media (:obj:`str`):
|
||||||
File to send.
|
Video file to send.
|
||||||
Pass a file path as string to send a video that exists on your local machine.
|
Pass a file path as string to send a video that exists on your local machine.
|
||||||
|
|
||||||
caption (:obj:`str`):
|
caption (:obj:`str`):
|
||||||
|
@@ -30,6 +30,7 @@ Proxy = namedtuple("Proxy", ["enabled", "hostname", "port", "username", "passwor
|
|||||||
class TCP(socks.socksocket):
|
class TCP(socks.socksocket):
|
||||||
def __init__(self, proxy: Proxy):
|
def __init__(self, proxy: Proxy):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
self.settimeout(10)
|
||||||
self.proxy_enabled = False
|
self.proxy_enabled = False
|
||||||
|
|
||||||
if proxy and proxy.enabled:
|
if proxy and proxy.enabled:
|
||||||
|
@@ -296,7 +296,7 @@ class Session:
|
|||||||
break
|
break
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._send(functions.Ping(0), False)
|
self._send(functions.PingDelayDisconnect(0, self.PING_INTERVAL + 15), False)
|
||||||
except (OSError, TimeoutError):
|
except (OSError, TimeoutError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user