diff --git a/pyrogram/methods/bots/send_game.py b/pyrogram/methods/bots/send_game.py index 0d7cd9a3ab..bc929945fe 100644 --- a/pyrogram/methods/bots/send_game.py +++ b/pyrogram/methods/bots/send_game.py @@ -35,6 +35,7 @@ async def send_game( reply_to_message_id: int = None, reply_to_chat_id: Union[int, str] = None, protect_content: bool = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -76,6 +77,12 @@ async def send_game( protect_content (``bool``, *optional*): Protects the contents of the sent message from forwarding and saving. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + 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. @@ -106,6 +113,7 @@ async def send_game( ), random_id=self.rnd_id(), noforwards=protect_content, + allow_paid_floodskip=allow_paid_broadcast, reply_markup=await reply_markup.write(self) if reply_markup else None, effect=effect_id ) diff --git a/pyrogram/methods/bots/send_invoice.py b/pyrogram/methods/bots/send_invoice.py index f096465028..921bc65d18 100644 --- a/pyrogram/methods/bots/send_invoice.py +++ b/pyrogram/methods/bots/send_invoice.py @@ -55,6 +55,7 @@ async def send_invoice( protect_content: Optional[bool] = None, message_effect_id: Optional[int] = None, reply_to_message_id: Optional[int] = None, + allow_paid_broadcast: bool = None, reply_markup: Optional[Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -152,6 +153,12 @@ async def send_invoice( message_effect_id (``int`` ``64-bit``, *optional*): Unique identifier of the message effect to be added to the message; for private chats only. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -216,6 +223,7 @@ async def send_invoice( ), random_id=self.rnd_id(), 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, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/copy_message.py b/pyrogram/methods/messages/copy_message.py index f46b443aa3..ae0b12b826 100644 --- a/pyrogram/methods/messages/copy_message.py +++ b/pyrogram/methods/messages/copy_message.py @@ -43,6 +43,7 @@ async def copy_message( protect_content: bool = None, has_spoiler: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -137,6 +138,7 @@ async def copy_message( schedule_date=schedule_date, protect_content=protect_content, has_spoiler=has_spoiler, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, business_connection_id=business_connection_id ) diff --git a/pyrogram/methods/messages/forward_media_group.py b/pyrogram/methods/messages/forward_media_group.py index 59e594a372..1b0b852056 100644 --- a/pyrogram/methods/messages/forward_media_group.py +++ b/pyrogram/methods/messages/forward_media_group.py @@ -35,7 +35,8 @@ async def forward_media_group( schedule_date: datetime = None, hide_sender_name: bool = None, hide_captions: bool = None, - protect_content: bool = None + protect_content: bool = None, + allow_paid_broadcast: bool = None ) -> List["types.Message"]: """Forward a media group by providing one of the message ids. @@ -75,6 +76,12 @@ async def forward_media_group( protect_content (``bool``, *optional*): Protects the contents of the sent message from forwarding and saving. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + Returns: List of :obj:`~pyrogram.types.Message`: On success, a list of forwarded messages is returned. @@ -97,6 +104,7 @@ async def forward_media_group( drop_author=hide_sender_name, drop_media_captions=hide_captions, noforwards=protect_content, + allow_paid_floodskip=allow_paid_broadcast, top_msg_id=message_thread_id ) ) diff --git a/pyrogram/methods/messages/forward_messages.py b/pyrogram/methods/messages/forward_messages.py index 73ec6a35ae..fe98f7d2c2 100644 --- a/pyrogram/methods/messages/forward_messages.py +++ b/pyrogram/methods/messages/forward_messages.py @@ -35,7 +35,8 @@ async def forward_messages( schedule_date: datetime = None, hide_sender_name: bool = None, hide_captions: bool = None, - protect_content: bool = None + protect_content: bool = None, + allow_paid_broadcast: bool = None ) -> Union["types.Message", List["types.Message"]]: """Forward messages of any kind. @@ -75,6 +76,13 @@ async def forward_messages( protect_content (``bool``, *optional*): Protects the contents of the sent message from forwarding and saving. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + + Returns: :obj:`~pyrogram.types.Message` | List of :obj:`~pyrogram.types.Message`: In case *message_ids* was not a list, a single message is returned, otherwise a list of messages is returned. @@ -103,6 +111,7 @@ async def forward_messages( drop_author=hide_sender_name, drop_media_captions=hide_captions, noforwards=protect_content, + allow_paid_floodskip=allow_paid_broadcast, top_msg_id=message_thread_id ) ) diff --git a/pyrogram/methods/messages/send_animation.py b/pyrogram/methods/messages/send_animation.py index 55fe2fd43d..371ba8fae9 100644 --- a/pyrogram/methods/messages/send_animation.py +++ b/pyrogram/methods/messages/send_animation.py @@ -57,6 +57,7 @@ async def send_animation( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -158,6 +159,12 @@ async def send_animation( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -279,6 +286,7 @@ async def progress(current, total): 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=effect_id, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/send_audio.py b/pyrogram/methods/messages/send_audio.py index 4a9448c065..7400432055 100644 --- a/pyrogram/methods/messages/send_audio.py +++ b/pyrogram/methods/messages/send_audio.py @@ -55,6 +55,7 @@ async def send_audio( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -151,6 +152,12 @@ async def send_audio( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -272,6 +279,7 @@ async def progress(current, total): 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=effect_id, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/send_cached_media.py b/pyrogram/methods/messages/send_cached_media.py index 44a899ca60..1d1ceac4ba 100644 --- a/pyrogram/methods/messages/send_cached_media.py +++ b/pyrogram/methods/messages/send_cached_media.py @@ -45,6 +45,7 @@ async def send_cached_media( has_spoiler: bool = None, show_caption_above_media: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -118,6 +119,12 @@ async def send_cached_media( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -151,6 +158,7 @@ async def send_cached_media( 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, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) ), diff --git a/pyrogram/methods/messages/send_contact.py b/pyrogram/methods/messages/send_contact.py index 85162bd511..42c8aa696a 100644 --- a/pyrogram/methods/messages/send_contact.py +++ b/pyrogram/methods/messages/send_contact.py @@ -46,6 +46,7 @@ async def send_contact( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -115,6 +116,12 @@ async def send_contact( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -151,6 +158,7 @@ async def send_contact( 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=effect_id ), diff --git a/pyrogram/methods/messages/send_dice.py b/pyrogram/methods/messages/send_dice.py index 3fcf618eac..d11be671f9 100644 --- a/pyrogram/methods/messages/send_dice.py +++ b/pyrogram/methods/messages/send_dice.py @@ -42,6 +42,7 @@ async def send_dice( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -109,6 +110,12 @@ async def send_dice( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -148,6 +155,7 @@ async def send_dice( 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, message="", effect=effect_id diff --git a/pyrogram/methods/messages/send_document.py b/pyrogram/methods/messages/send_document.py index 64c136826c..f5aadda976 100644 --- a/pyrogram/methods/messages/send_document.py +++ b/pyrogram/methods/messages/send_document.py @@ -53,6 +53,7 @@ async def send_document( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -143,6 +144,12 @@ async def send_document( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -244,6 +251,7 @@ async def progress(current, total): 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=effect_id, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/send_location.py b/pyrogram/methods/messages/send_location.py index 33662ac6ae..fc1ee2de0a 100644 --- a/pyrogram/methods/messages/send_location.py +++ b/pyrogram/methods/messages/send_location.py @@ -42,6 +42,7 @@ async def send_location( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -105,6 +106,12 @@ async def send_location( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -141,6 +148,7 @@ async def send_location( 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=effect_id ), diff --git a/pyrogram/methods/messages/send_media_group.py b/pyrogram/methods/messages/send_media_group.py index 471912514c..21f0beb0b0 100644 --- a/pyrogram/methods/messages/send_media_group.py +++ b/pyrogram/methods/messages/send_media_group.py @@ -56,7 +56,8 @@ async def send_media_group( schedule_date: datetime = None, protect_content: bool = None, show_caption_above_media: bool = None, - business_connection_id: str = None + business_connection_id: str = None, + allow_paid_broadcast: bool = None ) -> List["types.Message"]: """Send a group of photos or videos as an album. @@ -117,6 +118,12 @@ async def send_media_group( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + Returns: List of :obj:`~pyrogram.types.Message`: On success, a list of the sent messages is returned. @@ -468,6 +475,7 @@ async def send_media_group( schedule_date=utils.datetime_to_timestamp(schedule_date), noforwards=protect_content, invert_media=show_caption_above_media, + allow_paid_floodskip=allow_paid_broadcast, effect=effect_id, ), sleep_threshold=60, diff --git a/pyrogram/methods/messages/send_message.py b/pyrogram/methods/messages/send_message.py index 70b3923518..dab1af9cac 100644 --- a/pyrogram/methods/messages/send_message.py +++ b/pyrogram/methods/messages/send_message.py @@ -45,6 +45,7 @@ async def send_message( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -117,6 +118,12 @@ async def send_message( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -181,6 +188,7 @@ async def send_message( ), random_id=self.rnd_id(), schedule_date=utils.datetime_to_timestamp(schedule_date), + allow_paid_floodskip=allow_paid_broadcast, reply_markup=await reply_markup.write(self) if reply_markup else None, message=message, entities=entities, diff --git a/pyrogram/methods/messages/send_photo.py b/pyrogram/methods/messages/send_photo.py index 42a70594eb..bfc0f73a8a 100644 --- a/pyrogram/methods/messages/send_photo.py +++ b/pyrogram/methods/messages/send_photo.py @@ -52,6 +52,7 @@ async def send_photo( protect_content: bool = None, view_once: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -139,6 +140,12 @@ async def send_photo( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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 +240,7 @@ async def send_photo( 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=effect_id, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/send_poll.py b/pyrogram/methods/messages/send_poll.py index 05d5cb320c..ca6a165272 100644 --- a/pyrogram/methods/messages/send_poll.py +++ b/pyrogram/methods/messages/send_poll.py @@ -55,6 +55,7 @@ async def send_poll( schedule_date: Optional[datetime] = None, business_connection_id: Optional[str] = None, options_parse_mode: Optional["enums.ParseMode"] = None, + allow_paid_broadcast: bool = None, reply_markup: Optional[ Union[ "types.InlineKeyboardMarkup", @@ -172,6 +173,12 @@ async def send_poll( By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -245,6 +252,7 @@ async def send_poll( 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=effect_id ), diff --git a/pyrogram/methods/messages/send_sticker.py b/pyrogram/methods/messages/send_sticker.py index 795a178509..56b3b948ea 100644 --- a/pyrogram/methods/messages/send_sticker.py +++ b/pyrogram/methods/messages/send_sticker.py @@ -49,6 +49,7 @@ async def send_sticker( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -118,6 +119,12 @@ async def send_sticker( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -209,6 +216,7 @@ async def send_sticker( 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, message="", effect=effect_id diff --git a/pyrogram/methods/messages/send_venue.py b/pyrogram/methods/messages/send_venue.py index 06b9e2f3e6..3509995fcb 100644 --- a/pyrogram/methods/messages/send_venue.py +++ b/pyrogram/methods/messages/send_venue.py @@ -45,6 +45,7 @@ async def send_venue( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -121,6 +122,12 @@ async def send_venue( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -164,6 +171,7 @@ async def send_venue( 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=effect_id ), diff --git a/pyrogram/methods/messages/send_video.py b/pyrogram/methods/messages/send_video.py index 2a936508e5..97670bc123 100644 --- a/pyrogram/methods/messages/send_video.py +++ b/pyrogram/methods/messages/send_video.py @@ -59,6 +59,7 @@ async def send_video( protect_content: bool = None, no_sound: bool = True, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -169,6 +170,12 @@ async def send_video( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -292,6 +299,7 @@ async def progress(current, total): 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=effect_id, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/send_video_note.py b/pyrogram/methods/messages/send_video_note.py index 522899fe2f..92e7398ab1 100644 --- a/pyrogram/methods/messages/send_video_note.py +++ b/pyrogram/methods/messages/send_video_note.py @@ -52,6 +52,7 @@ async def send_video_note( protect_content: bool = None, view_once: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -137,6 +138,12 @@ async def send_video_note( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -243,6 +250,7 @@ async def send_video_note( 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, message="", effect=effect_id diff --git a/pyrogram/methods/messages/send_voice.py b/pyrogram/methods/messages/send_voice.py index 60209a37db..36a27791b7 100644 --- a/pyrogram/methods/messages/send_voice.py +++ b/pyrogram/methods/messages/send_voice.py @@ -52,6 +52,7 @@ async def send_voice( protect_content: bool = None, view_once: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -134,6 +135,12 @@ async def send_voice( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -244,6 +251,7 @@ async def send_voice( 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=effect_id, **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) diff --git a/pyrogram/methods/messages/send_web_page.py b/pyrogram/methods/messages/send_web_page.py index 5c45f236eb..1a97f8448e 100644 --- a/pyrogram/methods/messages/send_web_page.py +++ b/pyrogram/methods/messages/send_web_page.py @@ -47,6 +47,7 @@ async def send_web_page( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -128,6 +129,12 @@ async def send_web_page( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -186,6 +193,7 @@ async def send_web_page( force_small_media=prefer_small_media ), invert_media=show_caption_above_media, + allow_paid_floodskip=allow_paid_broadcast, entities=entities, noforwards=protect_content, effect=effect_id diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index ad8206fcc1..1c830657e8 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -1453,6 +1453,7 @@ async def reply_text( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup=None ) -> "Message": """Bound method *reply_text* of :obj:`~pyrogram.types.Message`. @@ -1526,6 +1527,12 @@ async def reply_text( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -1564,6 +1571,7 @@ async def reply_text( schedule_date=schedule_date, protect_content=protect_content, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -1583,6 +1591,7 @@ async def reply_animation( thumb: str = None, disable_notification: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -1677,6 +1686,12 @@ async def reply_animation( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -1741,6 +1756,7 @@ async def reply_animation( quote_text=quote_text, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -1764,6 +1780,7 @@ async def reply_audio( quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -1850,6 +1867,12 @@ async def reply_audio( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -1913,6 +1936,7 @@ async def reply_audio( quote_text=quote_text, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -1931,6 +1955,7 @@ async def reply_cached_media( quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -1994,6 +2019,12 @@ async def reply_cached_media( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -2028,6 +2059,7 @@ async def reply_cached_media( quote_text=quote_text, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -2094,6 +2126,7 @@ async def reply_contact( parse_mode: Optional["enums.ParseMode"] = None, quote_entities: List["types.MessageEntity"] = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -2164,6 +2197,12 @@ async def reply_contact( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -2200,6 +2239,7 @@ async def reply_contact( parse_mode=parse_mode, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -2222,6 +2262,7 @@ async def reply_document( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -2318,6 +2359,12 @@ async def reply_document( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -2382,6 +2429,7 @@ async def reply_document( schedule_date=schedule_date, protect_content=protect_content, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -2395,7 +2443,7 @@ async def reply_game( message_thread_id: int = None, effect_id: int = None, reply_to_message_id: int = None, - business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -2443,6 +2491,12 @@ async def reply_game( reply_to_message_id (``int``, *optional*): If the message is a reply, ID of the original message. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + 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. @@ -2469,6 +2523,7 @@ async def reply_game( message_thread_id=message_thread_id, effect_id=effect_id, reply_to_message_id=reply_to_message_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -2573,6 +2628,7 @@ async def reply_location( quote_text: str = None, quote_entities: List["types.MessageEntity"] = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -2633,6 +2689,12 @@ async def reply_location( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -2666,6 +2728,7 @@ async def reply_location( quote_text=quote_text, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -2680,6 +2743,7 @@ async def reply_media_group( quote_text: str = None, parse_mode: Optional["enums.ParseMode"] = None, quote_entities: List["types.MessageEntity"] = None, + allow_paid_broadcast: bool = None, business_connection_id: str = None ) -> List["types.Message"]: """Bound method *reply_media_group* of :obj:`~pyrogram.types.Message`. @@ -2734,6 +2798,12 @@ async def reply_media_group( quote_entities (List of :obj:`~pyrogram.types.MessageEntity`): List of special entities that appear in quote text, which can be specified instead of *parse_mode*. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. @@ -2766,6 +2836,7 @@ async def reply_media_group( quote_text=quote_text, parse_mode=parse_mode, quote_entities=quote_entities, + allow_paid_broadcast=allow_paid_broadcast, business_connection_id=business_connection_id ) @@ -2786,6 +2857,7 @@ async def reply_photo( quote_entities: List["types.MessageEntity"] = None, view_once: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -2869,6 +2941,12 @@ async def reply_photo( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -2931,6 +3009,7 @@ async def reply_photo( quote_entities=quote_entities, view_once=view_once, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -2965,6 +3044,7 @@ async def reply_poll( schedule_date: datetime = None, business_connection_id: str = None, options_parse_mode: List["types.MessageEntity"] = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3090,6 +3170,12 @@ async def reply_poll( By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -3140,6 +3226,7 @@ async def reply_poll( schedule_date=schedule_date, business_connection_id=business_connection_id, options_parse_mode=options_parse_mode, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -3155,6 +3242,7 @@ async def reply_sticker( parse_mode: Optional["enums.ParseMode"] = None, quote_entities: List["types.MessageEntity"] = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3220,6 +3308,12 @@ async def reply_sticker( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -3277,6 +3371,7 @@ async def reply_sticker( parse_mode=parse_mode, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -3299,6 +3394,7 @@ async def reply_venue( parse_mode: Optional["enums.ParseMode"] = None, quote_entities: List["types.MessageEntity"] = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3378,6 +3474,12 @@ async def reply_venue( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -3416,6 +3518,7 @@ async def reply_venue( parse_mode=parse_mode, quote_entities=quote_entities, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -3441,6 +3544,7 @@ async def reply_video( quote_entities: List["types.MessageEntity"] = None, no_sound: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3542,6 +3646,12 @@ async def reply_video( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -3609,6 +3719,7 @@ async def reply_video( quote_entities=quote_entities, no_sound=no_sound, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -3631,6 +3742,7 @@ async def reply_video_note( protect_content: bool = None, view_once: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3715,6 +3827,12 @@ async def reply_video_note( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -3777,6 +3895,7 @@ async def reply_video_note( protect_content=protect_content, view_once=view_once, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -3798,6 +3917,7 @@ async def reply_voice( quote_entities: List["types.MessageEntity"] = None, view_once: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -3876,6 +3996,12 @@ async def reply_voice( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -3937,6 +4063,7 @@ async def reply_voice( quote_entities=quote_entities, view_once=view_once, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup, progress=progress, progress_args=progress_args @@ -3964,6 +4091,7 @@ async def reply_web_page( schedule_date: datetime = None, protect_content: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -4052,6 +4180,12 @@ async def reply_web_page( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -4092,6 +4226,7 @@ async def reply_web_page( schedule_date=schedule_date, protect_content=protect_content, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=reply_markup ) @@ -4299,7 +4434,8 @@ async def forward( disable_notification: bool = None, hide_sender_name: bool = None, hide_captions: bool = None, - schedule_date: datetime = None + schedule_date: datetime = None, + allow_paid_broadcast: bool = None ) -> Union["types.Message", List["types.Message"]]: """Bound method *forward* of :obj:`~pyrogram.types.Message`. @@ -4341,6 +4477,12 @@ async def forward( hide_captions (``bool``, *optional*): If True, the original media captions will be removed. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + For bots only. + Returns: On success, the forwarded Message is returned. @@ -4355,7 +4497,8 @@ async def forward( disable_notification=disable_notification, schedule_date=schedule_date, hide_sender_name=hide_sender_name, - hide_captions=hide_captions + hide_captions=hide_captions, + allow_paid_broadcast=allow_paid_broadcast ) async def copy( @@ -4374,6 +4517,7 @@ async def copy( protect_content: bool = None, has_spoiler: bool = None, business_connection_id: str = None, + allow_paid_broadcast: bool = None, reply_markup: Union[ "types.InlineKeyboardMarkup", "types.ReplyKeyboardMarkup", @@ -4445,6 +4589,12 @@ async def copy( business_connection_id (``str``, *optional*): Unique identifier of the business connection on behalf of which the message will be sent. + allow_paid_broadcast (``bool``, *optional*): + If True, you will be allowed to send up to 1000 messages per second. + Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. + The relevant Stars will be withdrawn from the bot's balance. + 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. @@ -4481,6 +4631,7 @@ async def copy( schedule_date=schedule_date, protect_content=protect_content, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=self.reply_markup if reply_markup is object else reply_markup ) elif self.media: @@ -4497,6 +4648,7 @@ async def copy( protect_content=protect_content, has_spoiler=self.has_media_spoiler if has_spoiler is None else has_spoiler, business_connection_id=business_connection_id, + allow_paid_broadcast=allow_paid_broadcast, reply_markup=self.reply_markup if reply_markup is object else reply_markup ) @@ -4526,6 +4678,7 @@ async def copy( disable_notification=disable_notification, message_thread_id=message_thread_id, schedule_date=schedule_date, + allow_paid_broadcast=allow_paid_broadcast, business_connection_id=business_connection_id ) elif self.location: @@ -4536,6 +4689,7 @@ async def copy( disable_notification=disable_notification, message_thread_id=message_thread_id, schedule_date=schedule_date, + allow_paid_broadcast=allow_paid_broadcast, business_connection_id=business_connection_id ) elif self.venue: @@ -4550,6 +4704,7 @@ async def copy( disable_notification=disable_notification, message_thread_id=message_thread_id, schedule_date=schedule_date, + allow_paid_broadcast=allow_paid_broadcast, business_connection_id=business_connection_id ) elif self.poll: @@ -4560,6 +4715,7 @@ async def copy( disable_notification=disable_notification, message_thread_id=message_thread_id, schedule_date=schedule_date, + allow_paid_broadcast=allow_paid_broadcast, business_connection_id=business_connection_id ) elif self.game: @@ -4567,6 +4723,7 @@ async def copy( chat_id, game_short_name=self.game.short_name, disable_notification=disable_notification, + allow_paid_broadcast=allow_paid_broadcast, message_thread_id=message_thread_id ) else: