From 2c20777ea210efcdd57b514f24c2d1b6752aa525 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Wed, 31 Jul 2024 11:12:30 +0700 Subject: [PATCH] pyrofork: Add missing paramters Signed-off-by: wulan17 --- pyrogram/methods/messages/send_web_page.py | 8 +++- pyrogram/types/messages_and_media/message.py | 45 ++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/pyrogram/methods/messages/send_web_page.py b/pyrogram/methods/messages/send_web_page.py index a411a51c2..21415efdb 100644 --- a/pyrogram/methods/messages/send_web_page.py +++ b/pyrogram/methods/messages/send_web_page.py @@ -44,6 +44,7 @@ async def send_web_page( quote_entities: List["types.MessageEntity"] = None, schedule_date: datetime = None, protect_content: bool = None, + message_effect_id: int = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -118,6 +119,9 @@ async def send_web_page( protect_content (``bool``, *optional*): Protects the contents of the sent message from forwarding and saving. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + 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. @@ -162,7 +166,9 @@ async def send_web_page( media=media, invert_media=invert_media, entities=entities, - noforwards=protect_content + noforwards=protect_content, + schedule_date=utils.datetime_to_timestamp(schedule_date), + effect=message_effect_id ) if business_connection_id is not None: r = await self.invoke( diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 78584a95e..d503e0613 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -1491,6 +1491,7 @@ async def reply_animation( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, progress: Callable = None, progress_args: tuple = () ) -> "Message": @@ -1578,6 +1579,9 @@ async def reply_animation( List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + invert_media (``bool``, *optional*): True to invert the animation and caption position.. @@ -1653,6 +1657,7 @@ async def reply_animation( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, invert_media=invert_media, reply_markup=reply_markup, progress=progress, @@ -1677,6 +1682,7 @@ async def reply_audio( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -1766,6 +1772,9 @@ async def reply_audio( List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + 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. @@ -1837,6 +1846,7 @@ async def reply_audio( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -2167,6 +2177,7 @@ async def reply_document( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, schedule_date: datetime = None, reply_markup: Union[ "types.InlineKeyboardMarkup", @@ -2252,6 +2263,9 @@ async def reply_document( quote_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*): List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. schedule_date (:py:obj:`~datetime.datetime`, *optional*): Date when the message will be automatically sent. @@ -2325,6 +2339,7 @@ async def reply_document( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, schedule_date=schedule_date, reply_markup=reply_markup, progress=progress, @@ -2745,6 +2760,7 @@ async def reply_photo( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, view_once: bool = None, invert_media: bool = None, reply_markup: Union[ @@ -2832,6 +2848,9 @@ async def reply_photo( List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + 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. @@ -2900,6 +2919,7 @@ async def reply_photo( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, view_once=view_once, invert_media=invert_media, reply_markup=reply_markup, @@ -3107,6 +3127,7 @@ async def reply_sticker( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, parse_mode: Optional["enums.ParseMode"] = None, reply_markup: Union[ "types.InlineKeyboardMarkup", @@ -3168,6 +3189,9 @@ async def reply_sticker( List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): By default, quote_text are parsed using both Markdown and HTML styles. You can combine both syntaxes together. @@ -3236,6 +3260,7 @@ async def reply_sticker( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, parse_mode=parse_mode, reply_markup=reply_markup, progress=progress, @@ -3407,6 +3432,7 @@ async def reply_video( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, invert_media: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", @@ -3508,6 +3534,9 @@ async def reply_video( List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + invert_media (``bool``, *optional*): Pass True to invert the video and caption position. @@ -3585,6 +3614,7 @@ async def reply_video( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, invert_media=invert_media, reply_markup=reply_markup, progress=progress, @@ -3606,6 +3636,7 @@ async def reply_video_note( quote_entities: List["types.MessageEntity"] = None, parse_mode: Optional["enums.ParseMode"] = None, protect_content: bool = None, + message_effect_id: int = None, ttl_seconds: int = None, reply_markup: Union[ "types.InlineKeyboardMarkup", @@ -3682,6 +3713,9 @@ async def reply_video_note( protect_content (``bool``, *optional*): Protects the contents of the sent message from forwarding and saving. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + ttl_seconds (``int``, *optional*): Self-Destruct Timer. If you set a timer, the video note will self-destruct in *ttl_seconds* @@ -3754,6 +3788,7 @@ async def reply_video_note( quote_text=quote_text, quote_entities=quote_entities, protect_content=protect_content, + message_effect_id=message_effect_id, ttl_seconds=ttl_seconds, parse_mode=parse_mode, reply_markup=reply_markup, @@ -3775,6 +3810,7 @@ async def reply_voice( reply_in_chat_id: Union[int, str] = None, quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, + message_effect_id: int = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3848,6 +3884,9 @@ async def reply_voice( List of special entities that appear in quote_text, which can be specified instead of *parse_mode*. for reply_to_message only. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + 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. @@ -3915,6 +3954,7 @@ async def reply_voice( reply_to_chat_id=reply_to_chat_id, quote_text=quote_text, quote_entities=quote_entities, + message_effect_id=message_effect_id, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -3936,6 +3976,7 @@ async def reply_web_page( quote_entities: List["types.MessageEntity"] = None, schedule_date: datetime = None, protect_content: bool = None, + message_effect_id: int = None, reply_markup=None ) -> "Message": """Bound method *reply_web_page* of :obj:`~pyrogram.types.Message`. @@ -4009,6 +4050,9 @@ async def reply_web_page( protect_content (``bool``, *optional*): Protects the contents of the sent message from forwarding and saving. + message_effect_id (``int`` ``64-bit``, *optional*): + Unique identifier of the message effect to be added to the message; for private chats only. + 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. @@ -4056,6 +4100,7 @@ async def reply_web_page( quote_entities=quote_entities, schedule_date=schedule_date, protect_content=protect_content, + message_effect_id=message_effect_id, reply_markup=reply_markup )