Skip to content

Commit d790d5d

Browse files
Allowed “date_time” entities in checklist title, checklist task text, TextQuote, ReplyParameters quote, sendGift, and giftPremiumSubscription.
1 parent 60485e0 commit d790d5d

3 files changed

Lines changed: 21 additions & 14 deletions

File tree

telebot/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6883,10 +6883,10 @@ def send_gift(self, user_id: Optional[Union[str, int]] = None, gift_id: str=None
68836883
:param text: Text that will be shown along with the gift; 0-255 characters
68846884
:type text: :obj:`str`
68856885
6886-
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
6886+
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
68876887
:type text_parse_mode: :obj:`str`
68886888
6889-
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
6889+
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
68906890
:type text_entities: :obj:`list` of :obj:`types.MessageEntity`
68916891
68926892
:return: Returns True on success.
@@ -7590,10 +7590,10 @@ def gift_premium_subscription(
75907590
:param text: Text that will be shown along with the service message about the subscription; 0-128 characters
75917591
:type text: :obj:`str`
75927592
7593-
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
7593+
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
75947594
:type text_parse_mode: :obj:`str`
75957595
7596-
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
7596+
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
75977597
:type text_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
75987598
75997599
:return: Returns True on success.

telebot/async_telebot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8410,10 +8410,10 @@ async def send_gift(self, user_id: Optional[Union[str, int]] = None, gift_id: st
84108410
:param text: Text that will be shown along with the gift; 0-255 characters
84118411
:type text: :obj:`str`
84128412
8413-
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
8413+
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
84148414
:type text_parse_mode: :obj:`str`
84158415
8416-
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
8416+
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
84178417
:type text_entities: :obj:`list` of :obj:`types.MessageEntity`
84188418
84198419
:return: Returns True on success.
@@ -9159,10 +9159,10 @@ async def gift_premium_subscription(
91599159
:param text: Text that will be shown along with the service message about the subscription; 0-128 characters
91609160
:type text: :obj:`str`
91619161
9162-
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
9162+
:param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
91639163
:type text_parse_mode: :obj:`str`
91649164
9165-
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
9165+
:param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
91669166
:type text_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
91679167
91689168
:return: Returns True on success.

telebot/types.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9650,7 +9650,7 @@ class TextQuote(JsonDeserializable):
96509650
:param text: Text of the quoted part of a message that is replied to by the given message
96519651
:type text: :obj:`str`
96529652

9653-
:param entities: Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.
9653+
:param entities: Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.
96549654
:type entities: :obj:`list` of :class:`MessageEntity`
96559655

96569656
:param position: Approximate quote position in the original message in UTF-16 code units as specified by the sender
@@ -9698,13 +9698,18 @@ class ReplyParameters(JsonDeserializable, Dictionaryable, JsonSerializable):
96989698
:param message_id: Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified
96999699
:type message_id: :obj:`int`
97009700

9701-
:param chat_id: Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername)
9701+
:param chat_id: Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username
9702+
of the channel (in the format @channelusername)
97029703
:type chat_id: :obj:`int` or :obj:`str`
97039704

9704-
:param allow_sending_without_reply: Optional. Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.
9705+
:param allow_sending_without_reply: Optional. Pass True if the message should be sent even if the specified message to be replied to is not found;
9706+
can be used only for replies in the same chat and forum topic.
97059707
:type allow_sending_without_reply: :obj:`bool`
97069708

9707-
:param quote: Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.
9709+
:param quote: Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing.
9710+
The quote must be an exact substring of the message to be replied to, including bold, italic, underline,
9711+
strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote
9712+
isn't found in the original message.
97089713
:type quote: :obj:`str`
97099714

97109715
:param quote_parse_mode: Optional. Mode for parsing entities in the quote. See formatting options for more details.
@@ -13133,7 +13138,8 @@ class InputChecklistTask(JsonSerializable):
1313313138
:param parse_mode: Optional. Mode for parsing entities in the text. See formatting options for more details.
1313413139
:type parse_mode: :obj:`str`
1313513140

13136-
:param text_entities: Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
13141+
:param text_entities: Optional. List of special entities that appear in the text, which can be specified instead of parse_mode.
13142+
Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.
1313713143
:type text_entities: :obj:`list` of :class:`MessageEntity`
1313813144

1313913145
:return: Instance of the class
@@ -13173,7 +13179,8 @@ class InputChecklist(JsonSerializable):
1317313179
:param parse_mode: Optional. Mode for parsing entities in the title. See formatting options for more details.
1317413180
:type parse_mode: :obj:`str`
1317513181

13176-
:param title_entities: Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
13182+
:param title_entities: Optional. List of special entities that appear in the title, which can be specified instead of parse_mode.
13183+
Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.
1317713184
:type title_entities: :obj:`list` of :class:`MessageEntity`
1317813185

1317913186
:param tasks: List of 1-30 tasks in the checklist

0 commit comments

Comments
 (0)