mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 16:04:51 +00:00
pyrofork: add invert_media parameter to copy,edit_{caption,media},reply_{animation,media_group,photo,video} bound methods
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
fa7b7f3c58
commit
75d6e79917
1 changed files with 37 additions and 2 deletions
|
|
@ -1440,6 +1440,7 @@ class Message(Object, Update):
|
||||||
thumb: Union[str, BinaryIO] = None,
|
thumb: Union[str, BinaryIO] = None,
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
|
invert_media: bool = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
"types.ReplyKeyboardMarkup",
|
"types.ReplyKeyboardMarkup",
|
||||||
|
|
@ -1538,6 +1539,9 @@ class Message(Object, Update):
|
||||||
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
|
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
True to invert the animation and caption position..
|
||||||
|
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
||||||
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
||||||
instructions to remove reply keyboard or to force a reply from the user.
|
instructions to remove reply keyboard or to force a reply from the user.
|
||||||
|
|
@ -1610,6 +1614,7 @@ class Message(Object, Update):
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
progress_args=progress_args
|
progress_args=progress_args
|
||||||
|
|
@ -2586,7 +2591,8 @@ class Message(Object, Update):
|
||||||
business_connection_id: str = None,
|
business_connection_id: str = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
invert_media: bool = None
|
||||||
) -> List["types.Message"]:
|
) -> List["types.Message"]:
|
||||||
"""Bound method *reply_media_group* of :obj:`~pyrogram.types.Message`.
|
"""Bound method *reply_media_group* of :obj:`~pyrogram.types.Message`.
|
||||||
|
|
||||||
|
|
@ -2638,6 +2644,9 @@ class Message(Object, Update):
|
||||||
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
|
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
Inverts the position of the media and caption.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
On success, a :obj:`~pyrogram.types.Messages` object is returned containing all the
|
On success, a :obj:`~pyrogram.types.Messages` object is returned containing all the
|
||||||
single messages sent.
|
single messages sent.
|
||||||
|
|
@ -2672,7 +2681,8 @@ class Message(Object, Update):
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
business_connection_id=business_connection_id,
|
business_connection_id=business_connection_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text
|
quote_text=quote_text,
|
||||||
|
invert_media=invert_media
|
||||||
)
|
)
|
||||||
|
|
||||||
async def reply_photo(
|
async def reply_photo(
|
||||||
|
|
@ -2691,6 +2701,7 @@ class Message(Object, Update):
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
view_once: bool = None,
|
view_once: bool = None,
|
||||||
|
invert_media: bool = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
"types.ReplyKeyboardMarkup",
|
"types.ReplyKeyboardMarkup",
|
||||||
|
|
@ -2757,6 +2768,9 @@ class Message(Object, Update):
|
||||||
Self-Destruct Timer.
|
Self-Destruct Timer.
|
||||||
If True, the photo will self-destruct after it was viewed.
|
If True, the photo will self-destruct after it was viewed.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
Pass True to invert the photo and caption position.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
business_connection_id (``str``, *optional*):
|
||||||
Business connection identifier.
|
Business connection identifier.
|
||||||
for business bots only.
|
for business bots only.
|
||||||
|
|
@ -2842,6 +2856,7 @@ class Message(Object, Update):
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
view_once=view_once,
|
view_once=view_once,
|
||||||
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
progress_args=progress_args
|
progress_args=progress_args
|
||||||
|
|
@ -3346,6 +3361,7 @@ class Message(Object, Update):
|
||||||
reply_in_chat_id: Union[int, str] = None,
|
reply_in_chat_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
|
invert_media: bool = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
"types.ReplyKeyboardMarkup",
|
"types.ReplyKeyboardMarkup",
|
||||||
|
|
@ -3446,6 +3462,9 @@ class Message(Object, Update):
|
||||||
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
|
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
Pass True to invert the video and caption position.
|
||||||
|
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
||||||
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
||||||
instructions to remove reply keyboard or to force a reply from the user.
|
instructions to remove reply keyboard or to force a reply from the user.
|
||||||
|
|
@ -3520,6 +3539,7 @@ class Message(Object, Update):
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
progress_args=progress_args
|
progress_args=progress_args
|
||||||
|
|
@ -4065,6 +4085,7 @@ class Message(Object, Update):
|
||||||
caption: str,
|
caption: str,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
caption_entities: List["types.MessageEntity"] = None,
|
caption_entities: List["types.MessageEntity"] = None,
|
||||||
|
invert_media: bool = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
) -> "Message":
|
) -> "Message":
|
||||||
"""Bound method *edit_caption* of :obj:`~pyrogram.types.Message`.
|
"""Bound method *edit_caption* of :obj:`~pyrogram.types.Message`.
|
||||||
|
|
@ -4095,6 +4116,9 @@ class Message(Object, Update):
|
||||||
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
|
||||||
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
List of special entities that appear in the caption, which can be specified instead of *parse_mode*.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
Inverts the position of the media and caption.
|
||||||
|
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
|
|
@ -4110,12 +4134,14 @@ class Message(Object, Update):
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
caption_entities=caption_entities,
|
caption_entities=caption_entities,
|
||||||
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
||||||
async def edit_media(
|
async def edit_media(
|
||||||
self,
|
self,
|
||||||
media: "types.InputMedia",
|
media: "types.InputMedia",
|
||||||
|
invert_media: bool = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
) -> "Message":
|
) -> "Message":
|
||||||
"""Bound method *edit_media* of :obj:`~pyrogram.types.Message`.
|
"""Bound method *edit_media* of :obj:`~pyrogram.types.Message`.
|
||||||
|
|
@ -4139,6 +4165,9 @@ class Message(Object, Update):
|
||||||
media (:obj:`~pyrogram.types.InputMedia`):
|
media (:obj:`~pyrogram.types.InputMedia`):
|
||||||
One of the InputMedia objects describing an animation, audio, document, photo or video.
|
One of the InputMedia objects describing an animation, audio, document, photo or video.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
Inverts the position of the media and caption.
|
||||||
|
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
|
|
@ -4152,6 +4181,7 @@ class Message(Object, Update):
|
||||||
chat_id=self.chat.id,
|
chat_id=self.chat.id,
|
||||||
message_id=self.id,
|
message_id=self.id,
|
||||||
media=media,
|
media=media,
|
||||||
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -4270,6 +4300,7 @@ class Message(Object, Update):
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
invert_media: bool = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
"types.ReplyKeyboardMarkup",
|
"types.ReplyKeyboardMarkup",
|
||||||
|
|
@ -4341,6 +4372,9 @@ class Message(Object, Update):
|
||||||
protect_content (``bool``, *optional*):
|
protect_content (``bool``, *optional*):
|
||||||
Protects the contents of the sent message from forwarding and saving.
|
Protects the contents of the sent message from forwarding and saving.
|
||||||
|
|
||||||
|
invert_media (``bool``, *optional*):
|
||||||
|
Inverts the position of the media and caption.
|
||||||
|
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
|
||||||
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
Additional interface options. An object for an inline keyboard, custom reply keyboard,
|
||||||
instructions to remove reply keyboard or to force a reply from the user.
|
instructions to remove reply keyboard or to force a reply from the user.
|
||||||
|
|
@ -4387,6 +4421,7 @@ class Message(Object, Update):
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
has_spoiler=has_spoiler,
|
has_spoiler=has_spoiler,
|
||||||
protect_content=protect_content,
|
protect_content=protect_content,
|
||||||
|
invert_media=invert_media,
|
||||||
reply_markup=self.reply_markup if reply_markup is object else reply_markup
|
reply_markup=self.reply_markup if reply_markup is object else reply_markup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue