Skip to content

Commit

Permalink
Added new MessageEntity type “spoiler”.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mustafa Asaad committed Mar 8, 2022
1 parent 3eb3087 commit df707a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tgbotapi/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,12 @@ class MessageEntity(Dictionaryable, JsonDeserializable):
def __init__(self, ttype, offset, length, url, user, language):
"""
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
:param str ttype: Type of the entity
:param str ttype: Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag”
($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org),
“email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text),
“italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text),
“spoiler” (spoiler message), “code” (mono-width string), “pre” (mono-width block),
“text_link” (for clickable text URLs), “text_mention” (for users without usernames)
:param int offset: Offset in UTF-16 code units to the start of the entity
:param int length: Length of the entity in UTF-16 code units
:param str or None url: Optional. For “text_link” only, url that will be opened after user taps on the text
Expand Down

0 comments on commit df707a9

Please sign in to comment.