Skip to content

Commit d2b10d9

Browse files
Fix checklists usable-by
1 parent 99db122 commit d2b10d9

4 files changed

Lines changed: 7 additions & 62 deletions

File tree

pyrogram/methods/messages/add_checklist_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async def add_checklist_tasks(
3131
) -> int:
3232
"""Add tasks to a checklist in a message.
3333
34-
.. include:: /_includes/usable-by/users-bots.rst
34+
.. include:: /_includes/usable-by/users.rst
3535
3636
Parameters:
3737
chat_id (``int`` | ``str``):

pyrogram/methods/messages/mark_checklist_tasks_as_done.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async def mark_checklist_tasks_as_done(
3131
) -> int:
3232
"""Add tasks to a checklist in a message.
3333
34-
.. include:: /_includes/usable-by/users-bots.rst
34+
.. include:: /_includes/usable-by/users.rst
3535
3636
Parameters:
3737
chat_id (``int`` | ``str``):

pyrogram/methods/messages/send_checklist.py

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,11 @@ async def send_checklist(
4141
effect_id: Optional[int] = None,
4242
reply_parameters: Optional["types.ReplyParameters"] = None,
4343
schedule_date: Optional[datetime] = None,
44-
business_connection_id: Optional[str] = None,
45-
allow_paid_broadcast: Optional[bool] = None,
46-
paid_message_star_count: int = None,
47-
reply_markup: Optional[
48-
Union[
49-
"types.InlineKeyboardMarkup",
50-
"types.ReplyKeyboardMarkup",
51-
"types.ReplyKeyboardRemove",
52-
"types.ForceReply"
53-
]
54-
] = None,
44+
paid_message_star_count: int = None
5545
) -> "types.Message":
5646
"""Send a new checklist.
5747
58-
.. include:: /_includes/usable-by/users-bots.rst
48+
.. include:: /_includes/usable-by/users.rst
5949
6050
Parameters:
6151
chat_id (``int`` | ``str``):
@@ -102,22 +92,9 @@ async def send_checklist(
10292
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
10393
Date when the message will be automatically sent.
10494
105-
business_connection_id (``str``, *optional*):
106-
Unique identifier of the business connection on behalf of which the message will be sent.
107-
108-
allow_paid_broadcast (``bool``, *optional*):
109-
If True, you will be allowed to send up to 1000 messages per second.
110-
Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message.
111-
The relevant Stars will be withdrawn from the bot's balance.
112-
For bots only.
113-
11495
paid_message_star_count (``int``, *optional*):
11596
The number of Telegram Stars the user agreed to pay to send the messages.
11697
117-
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
118-
Additional interface options. An object for an inline keyboard, custom reply keyboard,
119-
instructions to remove reply keyboard or to force a reply from the user.
120-
12198
Returns:
12299
:obj:`~pyrogram.types.Message`: On success, the sent checklist message is returned.
123100
@@ -161,12 +138,9 @@ async def send_checklist(
161138
random_id=self.rnd_id(),
162139
schedule_date=utils.datetime_to_timestamp(schedule_date),
163140
noforwards=protect_content,
164-
allow_paid_floodskip=allow_paid_broadcast,
165141
allow_paid_stars=paid_message_star_count,
166-
reply_markup=await reply_markup.write(self) if reply_markup else None,
167142
effect=effect_id
168-
),
169-
business_connection_id=business_connection_id
143+
)
170144
)
171145

172146
messages = await utils.parse_messages(client=self, messages=r)

pyrogram/types/messages_and_media/message.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4805,17 +4805,7 @@ async def reply_checklist(
48054805
effect_id: Optional[int] = None,
48064806
reply_parameters: Optional["types.ReplyParameters"] = None,
48074807
schedule_date: Optional[datetime] = None,
4808-
business_connection_id: Optional[str] = None,
4809-
allow_paid_broadcast: Optional[bool] = None,
4810-
paid_message_star_count: int = None,
4811-
reply_markup: Optional[
4812-
Union[
4813-
"types.InlineKeyboardMarkup",
4814-
"types.ReplyKeyboardMarkup",
4815-
"types.ReplyKeyboardRemove",
4816-
"types.ForceReply"
4817-
]
4818-
] = None,
4808+
paid_message_star_count: int = None
48194809
) -> "Message":
48204810
"""Bound method *reply_checklist* of :obj:`~pyrogram.types.Message`.
48214811
@@ -4880,22 +4870,9 @@ async def reply_checklist(
48804870
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
48814871
Date when the message will be automatically sent.
48824872
4883-
business_connection_id (``str``, *optional*):
4884-
Unique identifier of the business connection on behalf of which the message will be sent.
4885-
4886-
allow_paid_broadcast (``bool``, *optional*):
4887-
If True, you will be allowed to send up to 1000 messages per second.
4888-
Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message.
4889-
The relevant Stars will be withdrawn from the bot's balance.
4890-
For bots only.
4891-
48924873
paid_message_star_count (``int``, *optional*):
48934874
The number of Telegram Stars the user agreed to pay to send the messages.
48944875
4895-
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
4896-
Additional interface options. An object for an inline keyboard, custom reply keyboard,
4897-
instructions to remove reply keyboard or to force a reply from the user.
4898-
48994876
Returns:
49004877
On success, the sent :obj:`~pyrogram.types.Message` is returned.
49014878
@@ -4913,9 +4890,6 @@ async def reply_checklist(
49134890
if message_thread_id is None:
49144891
message_thread_id = self.message_thread_id
49154892

4916-
if business_connection_id is None:
4917-
business_connection_id = self.business_connection_id
4918-
49194893
return await self._client.send_checklist(
49204894
chat_id=self.chat.id,
49214895
title=title,
@@ -4930,10 +4904,7 @@ async def reply_checklist(
49304904
effect_id=effect_id,
49314905
reply_parameters=reply_parameters,
49324906
schedule_date=schedule_date,
4933-
business_connection_id=business_connection_id,
4934-
allow_paid_broadcast=allow_paid_broadcast,
4935-
paid_message_star_count=paid_message_star_count,
4936-
reply_markup=reply_markup,
4907+
paid_message_star_count=paid_message_star_count
49374908
)
49384909

49394910
async def edit_text(

0 commit comments

Comments
 (0)