@@ -29,47 +29,36 @@ class SendChecklist:
2929 async def send_checklist (
3030 self : "pyrogram.Client" ,
3131 chat_id : Union [int , str ],
32- title : str ,
33- tasks : List ["types.InputChecklistTask" ],
34- parse_mode : Optional ["enums.ParseMode" ] = None ,
35- entities : Optional [List ["types.MessageEntity" ]] = None ,
36- others_can_add_tasks : Optional [bool ] = None ,
37- others_can_mark_tasks_as_done : Optional [bool ] = None ,
32+ checklist : "types.InputChecklist" ,
3833 disable_notification : Optional [bool ] = None ,
3934 protect_content : Optional [bool ] = None ,
4035 message_thread_id : Optional [int ] = None ,
4136 effect_id : Optional [int ] = None ,
4237 reply_parameters : Optional ["types.ReplyParameters" ] = None ,
4338 schedule_date : Optional [datetime ] = None ,
44- paid_message_star_count : int = None
39+ business_connection_id : Optional [str ] = None ,
40+ paid_message_star_count : int = None ,
41+ reply_markup : Optional [
42+ Union [
43+ "types.InlineKeyboardMarkup" ,
44+ "types.ReplyKeyboardMarkup" ,
45+ "types.ReplyKeyboardRemove" ,
46+ "types.ForceReply"
47+ ]
48+ ] = None ,
4549 ) -> "types.Message" :
4650 """Send a new checklist.
4751
48- .. include:: /_includes/usable-by/users.rst
52+ .. include:: /_includes/usable-by/users-bots .rst
4953
5054 Parameters:
5155 chat_id (``int`` | ``str``):
5256 Unique identifier (int) or username (str) of the target chat.
5357 For your personal cloud (Saved Messages) you can simply use "me" or "self".
5458 For a contact that exists in your Telegram address book you can use his phone number (str).
5559
56- title (``str``):
57- Title of the checklist.
58-
59- tasks (List of ``str``):
60- List of tasks in the checklist, 1-30 tasks.
61-
62- parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
63- The parse mode to use for the checklist.
64-
65- entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
66- List of special entities that appear in the checklist title.
67-
68- others_can_add_tasks (``bool``, *optional*):
69- True, if other users can add tasks to the list.
70-
71- others_can_mark_tasks_as_done (``bool``, *optional*):
72- True, if other users can mark tasks as done or not done.
60+ checklist (:obj:`~pyrogram.types.InputChecklist`):
61+ Checklist to send.
7362
7463 disable_notification (``bool``, *optional*):
7564 Sends the message silently.
@@ -92,9 +81,16 @@ async def send_checklist(
9281 schedule_date (:py:obj:`~datetime.datetime`, *optional*):
9382 Date when the message will be automatically sent.
9483
84+ business_connection_id (``str``, *optional*):
85+ Unique identifier of the business connection on behalf of which the message will be sent.
86+
9587 paid_message_star_count (``int``, *optional*):
9688 The number of Telegram Stars the user agreed to pay to send the messages.
9789
90+ reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
91+ Additional interface options. An object for an inline keyboard, custom reply keyboard,
92+ instructions to remove reply keyboard or to force a reply from the user.
93+
9894 Returns:
9995 :obj:`~pyrogram.types.Message`: On success, the sent checklist message is returned.
10096
@@ -111,7 +107,7 @@ async def send_checklist(
111107 )
112108 """
113109 title , entities = (await utils .parse_text_entities (
114- self , title , parse_mode , entities
110+ self , checklist . title , checklist . parse_mode , checklist . entities
115111 )).values ()
116112
117113 r = await self .invoke (
@@ -123,9 +119,9 @@ async def send_checklist(
123119 text = title ,
124120 entities = entities or []
125121 ),
126- list = [await task .write (self ) for task in tasks ],
127- others_can_append = others_can_add_tasks ,
128- others_can_complete = others_can_mark_tasks_as_done
122+ list = [await task .write (self ) for task in checklist . tasks ],
123+ others_can_append = checklist . others_can_add_tasks ,
124+ others_can_complete = checklist . others_can_mark_tasks_as_done
129125 )
130126 ),
131127 message = "" ,
@@ -139,8 +135,10 @@ async def send_checklist(
139135 schedule_date = utils .datetime_to_timestamp (schedule_date ),
140136 noforwards = protect_content ,
141137 allow_paid_stars = paid_message_star_count ,
138+ reply_markup = await reply_markup .write (self ) if reply_markup else None ,
142139 effect = effect_id
143- )
140+ ),
141+ business_connection_id = business_connection_id
144142 )
145143
146144 messages = await utils .parse_messages (client = self , messages = r )
0 commit comments