Update reply_* bound methods to support BinaryIO (#458)
reply_* bound methods weren't added to handle BinaryIO object, now they are.
This commit is contained in:
parent
b95587ed31
commit
2e08266f56
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from typing import List, Match, Union
|
from typing import List, Match, Union, BinaryIO
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
from pyrogram.api import types
|
from pyrogram.api import types
|
||||||
@ -763,7 +763,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_animation(
|
def reply_animation(
|
||||||
self,
|
self,
|
||||||
animation: str,
|
animation: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
@ -905,7 +905,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_audio(
|
def reply_audio(
|
||||||
self,
|
self,
|
||||||
audio: str,
|
audio: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
@ -1260,7 +1260,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_document(
|
def reply_document(
|
||||||
self,
|
self,
|
||||||
document: str,
|
document: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
@ -1661,7 +1661,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_photo(
|
def reply_photo(
|
||||||
self,
|
self,
|
||||||
photo: str,
|
photo: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
@ -1862,7 +1862,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_sticker(
|
def reply_sticker(
|
||||||
self,
|
self,
|
||||||
sticker: str,
|
sticker: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
@ -2065,7 +2065,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_video(
|
def reply_video(
|
||||||
self,
|
self,
|
||||||
video: str,
|
video: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
@ -2212,7 +2212,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_video_note(
|
def reply_video_note(
|
||||||
self,
|
self,
|
||||||
video_note: str,
|
video_note: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
duration: int = 0,
|
duration: int = 0,
|
||||||
@ -2335,7 +2335,7 @@ class Message(Object, Update):
|
|||||||
|
|
||||||
def reply_voice(
|
def reply_voice(
|
||||||
self,
|
self,
|
||||||
voice: str,
|
voice: Union[str, BinaryIO],
|
||||||
file_ref: str = None,
|
file_ref: str = None,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
|
Loading…
Reference in New Issue
Block a user