Skip to content

Commit 71cdf48

Browse files
committed
New content_types added
1 parent 071fff3 commit 71cdf48

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

telebot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4410,7 +4410,7 @@ def edit_message_text(
44104410
:param entities: List of special entities that appear in the message text, which can be specified instead of parse_mode
44114411
:type entities: List of :obj:`telebot.types.MessageEntity`
44124412
4413-
:param disable_web_page_preview: deprecated. Disables link previews for links in this message
4413+
:param disable_web_page_preview: deprecated.
44144414
:type disable_web_page_preview: :obj:`bool`
44154415
44164416
:param reply_markup: A JSON-serialized object for an inline keyboard.

telebot/types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3797,7 +3797,9 @@ class InputTextMessageContent(Dictionaryable):
37973797
:return: Instance of the class
37983798
:rtype: :class:`telebot.types.InputTextMessageContent`
37993799
"""
3800-
def __init__(self, message_text, parse_mode=None, entities=None, disable_web_page_preview=None, link_preview_options=None):
3800+
def __init__(
3801+
self, message_text, parse_mode=None, entities=None, disable_web_page_preview=None,
3802+
link_preview_options=None):
38013803
self.message_text: str = message_text
38023804
self.parse_mode: str = parse_mode
38033805
self.entities: List[MessageEntity] = entities

telebot/util.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,20 @@
2727

2828
#: Contains all media content types.
2929
content_type_media = [
30-
'text', 'audio', 'document', 'animation', 'game', 'photo', 'sticker', 'video', 'video_note', 'voice', 'contact',
31-
'location', 'venue', 'dice', 'invoice', 'successful_payment', 'connected_website', 'poll', 'passport_data',
32-
'web_app_data',
30+
'text', 'animation', 'audio', 'document', 'photo', 'sticker', 'story', 'video', 'video_note', 'voice', 'contact',
31+
'dice', 'game', 'poll', 'venue', 'location', 'invoice', 'successful_payment', 'connected_website',
32+
'passport_data', 'web_app_data',
3333
]
3434

3535
#: Contains all service content types such as `User joined the group`.
3636
content_type_service = [
3737
'new_chat_members', 'left_chat_member', 'new_chat_title', 'new_chat_photo', 'delete_chat_photo',
38-
'group_chat_created', 'supergroup_chat_created', 'channel_chat_created', 'migrate_to_chat_id',
39-
'migrate_from_chat_id', 'pinned_message', 'proximity_alert_triggered', 'video_chat_scheduled', 'video_chat_started',
40-
'video_chat_ended', 'video_chat_participants_invited', 'message_auto_delete_timer_changed', 'forum_topic_created',
41-
'forum_topic_closed', 'forum_topic_reopened', 'user_shared', 'chat_shared',
38+
'group_chat_created', 'supergroup_chat_created', 'channel_chat_created', 'message_auto_delete_timer_changed',
39+
'migrate_to_chat_id', 'migrate_from_chat_id', 'pinned_message', 'users_shared', 'chat_shared',
40+
'write_access_allowed', 'proximity_alert_triggered', 'forum_topic_created', 'forum_topic_edited',
41+
'forum_topic_closed', 'forum_topic_reopened', 'general_forum_topic_hidden', 'general_forum_topic_unhidden',
42+
'giveaway_created', 'giveaway', 'giveaway_winners', 'giveaway_completed', 'video_chat_scheduled',
43+
'video_chat_started', 'video_chat_ended', 'video_chat_participants_invited',
4244
]
4345

4446
#: All update types, should be used for allowed_updates parameter in polling.
@@ -187,7 +189,7 @@ def wait(self):
187189
return self.result
188190

189191

190-
class CustomRequestResponse():
192+
class CustomRequestResponse:
191193
"""
192194
:meta private:
193195
"""
@@ -365,7 +367,7 @@ def _text_before_last(substr: str) -> str:
365367
text = text[len(part):]
366368

367369

368-
def escape(text: str) -> str:
370+
def escape(text: str) -> Optional[str]:
369371
"""
370372
Replaces the following chars in `text` ('&' with '&amp;', '<' with '&lt;' and '>' with '&gt;').
371373

0 commit comments

Comments
 (0)