You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
2360
-
For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document).
2361
-
On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
2361
+
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
:param live_period: Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.
3165
+
:param live_period: Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
3166
3166
:type live_period: :obj:`int`
3167
3167
3168
3168
:param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
:param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
3285
3287
:type proximity_alert_radius: :obj:`int`
3286
3288
3289
+
:param live_period: New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged
3290
+
:type live_period: :obj:`int`
3291
+
3287
3292
:return: On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
5164
-
:type options: :obj:`list` of :obj:`str`
5171
+
:param options: A JSON-serialized list of 2-10 answer options
5172
+
:type options: :obj:`list` of :obj:`InputPollOption`
5165
5173
5166
5174
:param is_anonymous: True, if the poll needs to be anonymous, defaults to True
5167
5175
:type is_anonymous: :obj:`bool`
@@ -5172,12 +5180,10 @@ def send_poll(
5172
5180
:param allows_multiple_answers: True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
5173
5181
:type allows_multiple_answers: :obj:`bool`
5174
5182
5175
-
:param correct_option_id: 0-based identifier of the correct answer option. Available only for polls in quiz mode,
5176
-
defaults to None
5183
+
:param correct_option_id: 0-based identifier of the correct answer option. Available only for polls in quiz mode, defaults to None
5177
5184
:type correct_option_id: :obj:`int`
5178
5185
5179
-
:param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll,
5180
-
0-200 characters with at most 2 line feeds after entities parsing
5186
+
:param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
5181
5187
:type explanation: :obj:`str`
5182
5188
5183
5189
:param explanation_parse_mode: Mode for parsing entities in the explanation. See formatting options for more details.
@@ -5201,15 +5207,13 @@ def send_poll(
5201
5207
:param allow_sending_without_reply: deprecated. Pass True, if the message should be sent even if the specified replied-to message is not found
5202
5208
:type allow_sending_without_reply: :obj:`bool`
5203
5209
5204
-
:param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard,
5205
-
instructions to remove reply keyboard or to force a reply from the user.
5210
+
:param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
:param timeout: Timeout in seconds for waiting for a response from the user.
5209
5214
:type timeout: :obj:`int`
5210
5215
5211
-
:param explanation_entities: A JSON-serialized list of special entities that appear in the explanation,
5212
-
which can be specified instead of parse_mode
5216
+
:param explanation_entities: A JSON-serialized list of special entities that appear in the explanation, which can be specified instead of parse_mode
5213
5217
:type explanation_entities: :obj:`list` of :obj:`MessageEntity`
5214
5218
5215
5219
:param protect_content: Protects the contents of the sent message from forwarding and saving
@@ -5224,6 +5228,12 @@ def send_poll(
5224
5228
:param business_connection_id: Identifier of the business connection to use for the poll
5225
5229
:type business_connection_id: :obj:`str`
5226
5230
5231
+
:param question_parse_mode: Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed
5232
+
:type question_parse_mode: :obj:`str`
5233
+
5234
+
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode
5235
+
:type question_entities: :obj:`list` of :obj:`MessageEntity`
5236
+
5227
5237
:return: On success, the sent Message is returned.
5228
5238
:rtype: :obj:`types.Message`
5229
5239
"""
@@ -5255,6 +5265,18 @@ def send_poll(
5255
5265
raiseRuntimeError("The send_poll signature was changed, please see send_poll function details.")
0 commit comments