@@ -2104,6 +2104,90 @@ def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int],
2104
2104
message_thread_id = message_thread_id , protect_content = protect_content , remove_caption = remove_caption )
2105
2105
return [types .MessageID .de_json (message_id ) for message_id in result ]
2106
2106
2107
+ def send_checklist (
2108
+ self , business_connection_id : str , chat_id : Union [int , str ],
2109
+ checklist : types .InputChecklist ,
2110
+ disable_notification : Optional [bool ]= None ,
2111
+ protect_content : Optional [bool ]= None ,
2112
+ message_effect_id : Optional [str ]= None ,
2113
+ reply_parameters : Optional [types .ReplyParameters ]= None ,
2114
+ reply_markup : Optional [types .InlineKeyboardMarkup ]= None ) -> types .Message :
2115
+ """
2116
+ Use this method to send a checklist on behalf of a connected business account. On success,
2117
+ the sent Message is returned.
2118
+
2119
+ Telegram documentation: https://core.telegram.org/bots/api#sendchecklist
2120
+
2121
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
2122
+ :type business_connection_id: :obj:`str`
2123
+
2124
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2125
+ :type chat_id: :obj:`int` or :obj:`str`
2126
+
2127
+ :param checklist: A JSON-serialized object for the checklist to send
2128
+ :type checklist: :class:`telebot.types.InputChecklist`
2129
+
2130
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
2131
+ :type disable_notification: :obj:`bool`
2132
+
2133
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
2134
+ :type protect_content: :obj:`bool`
2135
+
2136
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
2137
+ :type message_effect_id: :obj:`str`
2138
+
2139
+ :param reply_parameters: Additional parameters for replies to messages
2140
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
2141
+
2142
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard.
2143
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
2144
+
2145
+ :return: On success, the sent Message is returned.
2146
+ :rtype: :class:`telebot.types.Message`
2147
+ """
2148
+ disable_notification = self .disable_notification if (disable_notification is None ) else disable_notification
2149
+ protect_content = self .protect_content if (protect_content is None ) else protect_content
2150
+
2151
+ if reply_parameters and (reply_parameters .allow_sending_without_reply is None ):
2152
+ reply_parameters .allow_sending_without_reply = self .allow_sending_without_reply
2153
+
2154
+ return types .Message .de_json (
2155
+ apihelper .send_checklist (
2156
+ self .token , business_connection_id , chat_id , checklist , disable_notification = disable_notification ,
2157
+ protect_content = protect_content , message_effect_id = message_effect_id ,
2158
+ reply_parameters = reply_parameters , reply_markup = reply_markup ))
2159
+
2160
+ def edit_message_checklist (
2161
+ self , business_connection_id : str , chat_id : Union [int , str ],
2162
+ message_id : int , checklist : types .InputChecklist ,
2163
+ reply_markup : Optional [types .InlineKeyboardMarkup ]= None ) -> types .Message :
2164
+ """
2165
+ Use this method to edit a checklist on behalf of a connected business account. On success,
2166
+ the edited Message is returned.
2167
+
2168
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagechecklist
2169
+
2170
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
2171
+ :type business_connection_id: :obj:`str`
2172
+
2173
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2174
+ :type chat_id: :obj:`int` or :obj:`str`
2175
+
2176
+ :param message_id: Unique identifier for the target message
2177
+ :type message_id: :obj:`int`
2178
+
2179
+ :param checklist: A JSON-serialized object for the new checklist
2180
+ :type checklist: :class:`telebot.types.InputChecklist`
2181
+
2182
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard.
2183
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
2184
+
2185
+ :return: On success, the edited Message is returned.
2186
+ :rtype: :class:`telebot.types.Message`
2187
+ """
2188
+ return types .Message .de_json (
2189
+ apihelper .edit_message_checklist (
2190
+ self .token , business_connection_id , chat_id , message_id , checklist , reply_markup = reply_markup ))
2107
2191
2108
2192
def send_dice (
2109
2193
self , chat_id : Union [int , str ],
@@ -5599,7 +5683,7 @@ def send_poll(
5599
5683
:param question: Poll question, 1-300 characters
5600
5684
:type question: :obj:`str`
5601
5685
5602
- :param options: A JSON-serialized list of 2-10 answer options
5686
+ :param options: A JSON-serialized list of 2-12 answer options
5603
5687
:type options: :obj:`list` of :obj:`InputPollOption` | :obj:`list` of :obj:`str`
5604
5688
5605
5689
:param is_anonymous: True, if the poll needs to be anonymous, defaults to True
@@ -5818,6 +5902,17 @@ def answer_pre_checkout_query(
5818
5902
"""
5819
5903
return apihelper .answer_pre_checkout_query (
5820
5904
self .token , pre_checkout_query_id , ok , error_message = error_message )
5905
+
5906
+ def get_my_star_balance (self ) -> types .StarAmount :
5907
+ """
5908
+ Returns the bot's current Telegram Stars balance. On success, returns a StarAmount object.
5909
+
5910
+ Telegram documentation: https://core.telegram.org/bots/api#getmystarbalance
5911
+
5912
+ :return: On success, returns a StarAmount object.
5913
+ :rtype: :obj:`types.StarAmount`
5914
+ """
5915
+ return types .StarAmount .de_json (apihelper .get_my_star_balance (self .token ))
5821
5916
5822
5917
5823
5918
def get_star_transactions (self , offset : Optional [int ]= None , limit : Optional [int ]= None ) -> types .StarTransactions :
0 commit comments