pyrofork: Add allow_paid_broadcast parameter to methods.

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
Shrimadhav U K 2024-11-04 14:20:08 +05:30 committed by wulan17
parent cf67f9534c
commit 3426ad59a2
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
20 changed files with 207 additions and 8 deletions

View file

@ -34,6 +34,7 @@ class SendGame:
business_connection_id: str = None,
reply_to_message_id: int = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -74,6 +75,9 @@ class SendGame:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -109,6 +113,7 @@ class SendGame:
reply_to=reply_to,
random_id=self.rnd_id(),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
reply_markup=await reply_markup.write(self) if reply_markup else None
)

View file

@ -56,6 +56,7 @@ class SendAnimation:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
invert_media: bool = None,
reply_markup: Union[
@ -161,6 +162,9 @@ class SendAnimation:
protect_content (``bool``, *optional*):
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*):
Inverts the position of the animation and caption.
@ -286,6 +290,7 @@ class SendAnimation:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
invert_media=invert_media,
reply_markup=await reply_markup.write(self) if reply_markup else None,

View file

@ -55,6 +55,7 @@ class SendAudio:
message_effect_id: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup",
@ -153,6 +154,9 @@ class SendAudio:
protect_content (``bool``, *optional*):
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
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.
@ -268,6 +272,7 @@ class SendAudio:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
reply_markup=await reply_markup.write(self) if reply_markup else None,
**await utils.parse_text_entities(self, caption, parse_mode, caption_entities)

View file

@ -44,6 +44,7 @@ class SendCachedMedia:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
invert_media: bool = False,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -117,6 +118,9 @@ class SendCachedMedia:
protect_content (``bool``, *optional*):
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*):
Inverts the position of the media and caption.
@ -160,6 +164,7 @@ class SendCachedMedia:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
invert_media=invert_media,
reply_markup=await reply_markup.write(self) if reply_markup else None,
**await utils.parse_text_entities(self, caption, parse_mode, caption_entities)

View file

@ -43,6 +43,7 @@ class SendContact:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -113,6 +114,9 @@ class SendContact:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -154,6 +158,7 @@ class SendContact:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
reply_markup=await reply_markup.write(self) if reply_markup else None,
effect=message_effect_id
)

View file

@ -41,6 +41,7 @@ class SendDice:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -109,6 +110,9 @@ class SendDice:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -152,6 +156,7 @@ class SendDice:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
reply_markup=await reply_markup.write(self) if reply_markup else None,
effect=message_effect_id,
message=""

View file

@ -53,6 +53,7 @@ class SendDocument:
message_effect_id: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup",
@ -145,6 +146,9 @@ class SendDocument:
protect_content (``bool``, *optional*):
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
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.
@ -246,6 +250,7 @@ class SendDocument:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
reply_markup=await reply_markup.write(self) if reply_markup else None,
**await utils.parse_text_entities(self, caption, parse_mode, caption_entities)

View file

@ -43,6 +43,7 @@ class SendLocation:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -110,6 +111,9 @@ class SendLocation:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -152,6 +156,7 @@ class SendLocation:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
reply_markup=await reply_markup.write(self) if reply_markup else None,
effect=message_effect_id
)

View file

@ -57,6 +57,7 @@ class SendMediaGroup:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
invert_media: bool = None
) -> List["types.Message"]:
@ -116,6 +117,9 @@ class SendMediaGroup:
protect_content (``bool``, *optional*):
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.
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -474,6 +478,7 @@ class SendMediaGroup:
reply_to=reply_to,
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
invert_media=invert_media
)

View file

@ -43,6 +43,7 @@ class SendMessage:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
invert_media: bool = None,
message_effect_id: int = None,
reply_markup: Union[
@ -113,6 +114,9 @@ class SendMessage:
protect_content (``bool``, *optional*):
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*):
Move web page preview to above the message.
@ -186,6 +190,7 @@ class SendMessage:
message=message,
entities=entities,
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
invert_media=invert_media,
effect=message_effect_id,
)

View file

@ -50,6 +50,7 @@ class SendPhoto:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
view_once: bool = None,
invert_media: bool = None,
@ -135,6 +136,9 @@ class SendPhoto:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -240,6 +244,7 @@ class SendPhoto:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
invert_media=invert_media,
reply_markup=await reply_markup.write(self) if reply_markup else None,

View file

@ -44,6 +44,7 @@ class SendPoll:
is_closed: bool = None,
disable_notification: bool = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_thread_id: int = None,
business_connection_id: str = None,
reply_to_message_id: int = None,
@ -127,6 +128,9 @@ class SendPoll:
protect_content (``bool``, *optional*):
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
message_thread_id (``int``, *optional*):
Unique identifier for the target message thread (topic) of the forum.
for forum supergroups only.
@ -228,6 +232,7 @@ class SendPoll:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
reply_markup=await reply_markup.write(self) if reply_markup else None,
effect=message_effect_id
)

View file

@ -49,6 +49,7 @@ class SendSticker:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -122,6 +123,9 @@ class SendSticker:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -220,6 +224,7 @@ class SendSticker:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
reply_markup=await reply_markup.write(self) if reply_markup else None,
message=""

View file

@ -47,6 +47,7 @@ class SendVenue:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -124,6 +125,9 @@ class SendVenue:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -172,6 +176,7 @@ class SendVenue:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
reply_markup=await reply_markup.write(self) if reply_markup else None,
effect=message_effect_id
)

View file

@ -57,6 +57,7 @@ class SendVideo:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
invert_media: bool = None,
reply_markup: Union[
@ -164,6 +165,9 @@ class SendVideo:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -292,6 +296,7 @@ class SendVideo:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
invert_media=invert_media,
reply_markup=await reply_markup.write(self) if reply_markup else None,

View file

@ -50,6 +50,7 @@ class SendVideoNote:
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
ttl_seconds: int = None,
message_effect_id: int = None,
reply_markup: Union[
@ -136,6 +137,9 @@ class SendVideoNote:
protect_content (``bool``, *optional*):
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
ttl_seconds (``int``, *optional*):
Self-Destruct Timer.
If you set a timer, the video note will self-destruct in *ttl_seconds*
@ -246,6 +250,7 @@ class SendVideoNote:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
reply_markup=await reply_markup.write(self) if reply_markup else None,
message=""

View file

@ -50,6 +50,7 @@ class SendVoice:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -134,6 +135,9 @@ class SendVoice:
protect_content (``bool``, *optional*):
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
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.
@ -233,6 +237,7 @@ class SendVoice:
random_id=self.rnd_id(),
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id,
reply_markup=await reply_markup.write(self) if reply_markup else None,
**await utils.parse_text_entities(self, caption, parse_mode, caption_entities)

View file

@ -44,6 +44,7 @@ class SendWebPage:
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -119,6 +120,9 @@ class SendWebPage:
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -167,6 +171,7 @@ class SendWebPage:
invert_media=invert_media,
entities=entities,
noforwards=protect_content,
allow_paid_floodskip=allow_paid_broadcast,
effect=message_effect_id
)
if business_connection_id is not None:

View file

@ -39,6 +39,7 @@ class SendInvoice:
reply_to_message_id: int = None,
message_thread_id: int = None,
quote_text: str = None,
allow_paid_broadcast: bool = None,
quote_entities: List["types.MessageEntity"] = None,
reply_markup: "types.InlineKeyboardMarkup" = None
):
@ -102,6 +103,9 @@ class SendInvoice:
Text to quote.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only
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.
@ -202,6 +206,7 @@ class SendInvoice:
start_param=start_parameter,
extended_media=extended_media
),
allow_paid_floodskip=allow_paid_broadcast,
random_id=self.rnd_id(),
reply_to=reply_to,
message="",

View file

@ -1371,6 +1371,7 @@ class Message(Object, Update):
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
invert_media: bool = None,
reply_markup=None
@ -1443,6 +1444,9 @@ class Message(Object, Update):
protect_content (``bool``, *optional*):
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.
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -1494,6 +1498,7 @@ class Message(Object, Update):
quote_entities=quote_entities,
schedule_date=schedule_date,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
invert_media=invert_media,
reply_markup=reply_markup
@ -1527,6 +1532,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
progress: Callable = None,
progress_args: tuple = ()
@ -1615,6 +1621,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots.
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -1693,6 +1702,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
invert_media=invert_media,
reply_markup=reply_markup,
@ -1718,6 +1728,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -1808,6 +1819,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots.
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -1882,6 +1896,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
reply_markup=reply_markup,
progress=progress,
@ -1900,6 +1915,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup",
@ -1962,6 +1978,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots.
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.
@ -2000,6 +2019,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
reply_markup=reply_markup
)
@ -2080,6 +2100,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
parse_mode: Optional["enums.ParseMode"] = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -2146,6 +2167,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
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.
@ -2193,6 +2217,7 @@ class Message(Object, Update):
business_connection_id=business_connection_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
parse_mode=parse_mode,
reply_markup=reply_markup
)
@ -2213,6 +2238,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
schedule_date: datetime = None,
reply_markup: Union[
@ -2300,6 +2326,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots.
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -2375,6 +2404,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
schedule_date=schedule_date,
reply_markup=reply_markup,
@ -2389,6 +2419,7 @@ class Message(Object, Update):
disable_notification: bool = None,
reply_to_message_id: int = None,
business_connection_id: str = None,
allow_paid_broadcast: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup",
@ -2432,6 +2463,9 @@ class Message(Object, Update):
Business connection identifier.
for business bots only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots.
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
An object for an inline keyboard. If empty, one Play game_title button will be shown automatically.
If not empty, the first button must launch the game.
@ -2462,6 +2496,7 @@ class Message(Object, Update):
message_thread_id=message_thread_id,
reply_to_message_id=reply_to_message_id,
business_connection_id=business_connection_id,
allow_paid_broadcast=allow_paid_broadcast,
reply_markup=reply_markup
)
@ -2559,6 +2594,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
parse_mode: Optional["enums.ParseMode"] = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -2622,6 +2658,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
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.
@ -2668,6 +2707,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
parse_mode=parse_mode,
reply_markup=reply_markup
)
@ -2687,6 +2727,7 @@ class Message(Object, Update):
business_connection_id: str = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
parse_mode: Optional["enums.ParseMode"] = None,
invert_media: bool = None
) -> List["types.Message"]:
@ -2740,6 +2781,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
invert_media (``bool``, *optional*):
Inverts the position of the media and caption.
@ -2778,6 +2822,7 @@ class Message(Object, Update):
business_connection_id=business_connection_id,
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
invert_media=invert_media
)
@ -2796,6 +2841,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
view_once: bool = None,
invert_media: bool = None,
@ -2884,6 +2930,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -2955,6 +3004,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
view_once=view_once,
invert_media=invert_media,
@ -2986,6 +3036,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
parse_mode: Optional["enums.ParseMode"] = None,
schedule_date: datetime = None,
reply_markup: Union[
@ -3104,6 +3155,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots.
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.
@ -3164,6 +3218,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
parse_mode=parse_mode,
schedule_date=schedule_date,
reply_markup=reply_markup
@ -3180,6 +3235,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
parse_mode: Optional["enums.ParseMode"] = None,
reply_markup: Union[
@ -3245,6 +3301,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -3317,6 +3376,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
parse_mode=parse_mode,
reply_markup=reply_markup,
@ -3340,6 +3400,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
parse_mode: Optional["enums.ParseMode"] = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -3415,6 +3476,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
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.
@ -3464,6 +3528,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
parse_mode=parse_mode,
reply_markup=reply_markup
)
@ -3489,6 +3554,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
invert_media: bool = None,
reply_markup: Union[
@ -3591,6 +3657,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -3671,6 +3740,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
invert_media=invert_media,
reply_markup=reply_markup,
@ -3693,6 +3763,7 @@ class Message(Object, Update):
quote_entities: List["types.MessageEntity"] = None,
parse_mode: Optional["enums.ParseMode"] = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
ttl_seconds: int = None,
reply_markup: Union[
@ -3770,6 +3841,9 @@ class Message(Object, Update):
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -3845,6 +3919,7 @@ class Message(Object, Update):
quote_text=quote_text,
quote_entities=quote_entities,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
ttl_seconds=ttl_seconds,
parse_mode=parse_mode,
@ -3867,6 +3942,7 @@ class Message(Object, Update):
reply_in_chat_id: Union[int, str] = None,
quote_text: str = None,
quote_entities: List["types.MessageEntity"] = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -3941,6 +4017,9 @@ class Message(Object, Update):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
allow_paid_broadcast (``bool``, *optional*):
Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -4011,6 +4090,7 @@ class Message(Object, Update):
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
reply_markup=reply_markup,
progress=progress,
@ -4033,6 +4113,7 @@ class Message(Object, Update):
quote_entities: List["types.MessageEntity"] = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
message_effect_id: int = None,
reply_markup=None
) -> "Message":
@ -4107,6 +4188,9 @@ class Message(Object, Update):
protect_content (``bool``, *optional*):
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
message_effect_id (``int`` ``64-bit``, *optional*):
Unique identifier of the message effect to be added to the message; for private chats only.
@ -4157,6 +4241,7 @@ class Message(Object, Update):
quote_entities=quote_entities,
schedule_date=schedule_date,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
reply_markup=reply_markup
)
@ -4402,6 +4487,7 @@ class Message(Object, Update):
disable_notification: bool = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
drop_author: bool = None
) -> Union["types.Message", List["types.Message"]]:
"""Bound method *forward* of :obj:`~pyrogram.types.Message`.
@ -4441,6 +4527,9 @@ class Message(Object, Update):
protect_content (``bool``, *optional*):
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
drop_author (``bool``, *optional*):
Forwards messages without quoting the original author
@ -4458,6 +4547,7 @@ class Message(Object, Update):
disable_notification=disable_notification,
schedule_date=schedule_date,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
drop_author=drop_author
)
@ -4475,6 +4565,7 @@ class Message(Object, Update):
reply_to_message_id: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
allow_paid_broadcast: bool = None,
invert_media: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@ -4547,6 +4638,9 @@ class Message(Object, Update):
protect_content (``bool``, *optional*):
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
invert_media (``bool``, *optional*):
Inverts the position of the media and caption.
@ -4581,9 +4675,10 @@ class Message(Object, Update):
message_thread_id=message_thread_id,
reply_to_message_id=reply_to_message_id,
quote_text=quote_text,
quote_entities=quote_entities,
quote_entities=quote_entities,
schedule_date=schedule_date,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
reply_markup=self.reply_markup if reply_markup is object else reply_markup
)
elif self.media:
@ -4596,6 +4691,7 @@ class Message(Object, Update):
schedule_date=schedule_date,
has_spoiler=has_spoiler,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
invert_media=invert_media,
reply_markup=self.reply_markup if reply_markup is object else reply_markup
)
@ -4625,7 +4721,8 @@ class Message(Object, Update):
vcard=self.contact.vcard,
disable_notification=disable_notification,
message_thread_id=message_thread_id,
schedule_date=schedule_date
schedule_date=schedule_date,
allow_paid_broadcast=allow_paid_broadcast,
)
elif self.location:
return await self._client.send_location(
@ -4634,7 +4731,8 @@ class Message(Object, Update):
longitude=self.location.longitude,
disable_notification=disable_notification,
message_thread_id=message_thread_id,
schedule_date=schedule_date
schedule_date=schedule_date,
allow_paid_broadcast=allow_paid_broadcast
)
elif self.venue:
return await self._client.send_venue(
@ -4647,7 +4745,8 @@ class Message(Object, Update):
foursquare_type=self.venue.foursquare_type,
disable_notification=disable_notification,
message_thread_id=message_thread_id,
schedule_date=schedule_date
schedule_date=schedule_date,
allow_paid_broadcast=allow_paid_broadcast
)
elif self.poll:
return await self._client.send_poll(
@ -4661,14 +4760,16 @@ class Message(Object, Update):
],
disable_notification=disable_notification,
message_thread_id=message_thread_id,
schedule_date=schedule_date
schedule_date=schedule_date,
allow_paid_broadcast=allow_paid_broadcast
)
elif self.game:
return await self._client.send_game(
chat_id,
game_short_name=self.game.short_name,
disable_notification=disable_notification,
message_thread_id=message_thread_id
message_thread_id=message_thread_id,
allow_paid_broadcast=allow_paid_broadcast
)
elif self.web_page_preview:
return await self._client.send_web_page(
@ -4686,6 +4787,7 @@ class Message(Object, Update):
quote_entities=quote_entities,
schedule_date=schedule_date,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
reply_markup=self.reply_markup if reply_markup is object else reply_markup
)
else:
@ -4694,7 +4796,8 @@ class Message(Object, Update):
if self.sticker or self.video_note: # Sticker and VideoNote should have no caption
return await send_media(
file_id=file_id,
message_thread_id=message_thread_id
message_thread_id=message_thread_id,
allow_paid_broadcast=allow_paid_broadcast
)
else:
if caption is None:
@ -4707,7 +4810,8 @@ class Message(Object, Update):
parse_mode=parse_mode,
caption_entities=caption_entities,
has_spoiler=has_spoiler,
message_thread_id=message_thread_id
message_thread_id=message_thread_id,
allow_paid_broadcast=allow_paid_broadcast
)
else:
raise ValueError("Can't copy this message")