MessageEntity¶
- class pyrogram.types.MessageEntity¶
One special entity in a text message.
For example, hashtags, usernames, URLs, etc.
- Parameters:¶
type (:obj:`~pyrogram.enums.MessageEntityType`) – Type of the entity.
offset (``int``) – Offset in UTF-16 code units to the start of the entity.
length (``int``) – Length of the entity in UTF-16 code units.
url (``str``, *optional*) – For
TEXT_LINKonly, url that will be opened after user taps on the text.user (:obj:`~pyrogram.types.User`, *optional*) – For
TEXT_MENTIONonly, the mentioned user.language (``str``, *optional*) – For
PREonly, the programming language of the entity text.custom_emoji_id (``str``, *optional*) – For
CUSTOM_EMOJIonly, unique identifier of the custom emoji. Useget_custom_emoji_stickers()to get full information about the sticker.unix_time (``int``, *optional*) – For
DATE_TIMEonly, the Unix time associated with the entity.date_time_format (``str``, *optional*) – For
DATE_TIMEonly, the string that defines the formatting of the date and time.