Skip to content

Commit

Permalink
Pyrofork: Add invert_media parameter to send_message and Message.repl…
Browse files Browse the repository at this point in the history
…y_text

Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed Jan 1, 2024
1 parent 243bc6c commit 358551f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyrogram/methods/messages/send_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async def send_message(
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
invert_media: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup",
Expand Down Expand Up @@ -104,6 +105,9 @@ async def send_message(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
invert_media (``bool``, *optional*):
Move web page preview to above the message.
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,
instructions to remove reply keyboard or to force a reply from the user.
Expand Down Expand Up @@ -171,7 +175,8 @@ async def send_message(
reply_markup=await reply_markup.write(self) if reply_markup else None,
message=message,
entities=entities,
noforwards=protect_content
noforwards=protect_content,
invert_media=invert_media
)
)

Expand Down
5 changes: 5 additions & 0 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,7 @@ async def reply_text(
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
invert_media: bool = None,
reply_markup=None
) -> "Message":
"""Bound method *reply_text* of :obj:`~pyrogram.types.Message`.
Expand Down Expand Up @@ -1259,6 +1260,9 @@ async def reply_text(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
invert_media (``bool``, *optional*):
Move web page preview to above the message.
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,
instructions to remove reply keyboard or to force a reply from the user.
Expand Down Expand Up @@ -1300,6 +1304,7 @@ async def reply_text(
quote_entities=quote_entities,
schedule_date=schedule_date,
protect_content=protect_content,
invert_media=invert_media,
reply_markup=reply_markup
)

Expand Down

0 comments on commit 358551f

Please sign in to comment.