pyrofork: Add missing allow_paid_broadcast parameter to copy_message and forward_messages method

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2024-11-22 21:48:23 +07:00
parent 5dda91d3b0
commit efce392266
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
2 changed files with 10 additions and 0 deletions

View file

@ -42,6 +42,7 @@ class CopyMessage:
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,
allow_paid_broadcast: bool = None,
invert_media: bool = False, invert_media: bool = False,
reply_markup: Union[ reply_markup: Union[
"types.InlineKeyboardMarkup", "types.InlineKeyboardMarkup",
@ -105,6 +106,9 @@ class CopyMessage:
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.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only.
invert_media (``bool``, *optional*): invert_media (``bool``, *optional*):
Inverts the position of the media and caption. Inverts the position of the media and caption.
@ -135,6 +139,7 @@ class CopyMessage:
reply_to_message_id=reply_to_message_id, reply_to_message_id=reply_to_message_id,
schedule_date=schedule_date, schedule_date=schedule_date,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
invert_media=invert_media, invert_media=invert_media,
reply_markup=reply_markup reply_markup=reply_markup
) )

View file

@ -35,6 +35,7 @@ class ForwardMessages:
disable_notification: bool = None, disable_notification: bool = None,
schedule_date: datetime = None, schedule_date: datetime = None,
protect_content: bool = None, protect_content: bool = None,
allow_paid_broadcast: bool = None,
drop_author: bool = None drop_author: bool = None
) -> Union["types.Message", List["types.Message"]]: ) -> Union["types.Message", List["types.Message"]]:
"""Forward messages of any kind. """Forward messages of any kind.
@ -71,6 +72,9 @@ class ForwardMessages:
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.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only.
drop_author (``bool``, *optional*): drop_author (``bool``, *optional*):
Forwards messages without quoting the original author Forwards messages without quoting the original author
@ -101,6 +105,7 @@ class ForwardMessages:
random_id=[self.rnd_id() for _ in message_ids], random_id=[self.rnd_id() for _ in message_ids],
schedule_date=utils.datetime_to_timestamp(schedule_date), schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content, noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
drop_author=drop_author drop_author=drop_author
) )
) )