MessageEntity¶
- class pyrogram.types.MessageEntity¶
One special entity in a text message.
For example, hashtags, usernames, URLs, etc.
- Parameters:
type (
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) – ForTEXT_LINKonly, url that will be opened after user taps on the text.user (
User, optional) – ForTEXT_MENTIONonly, the mentioned user.language (
str, optional) – Forpreonly, the programming language of the entity text.custom_emoji_id (
int, optional) – ForCUSTOM_EMOJIonly, unique identifier of the custom emoji. Useget_custom_emoji_stickers()to get full information about the sticker.collapsed (
bool, optional) – ForBLOCKQUOTEonly, whether the blockquote is expandable.date (
int, optional) – ForFORMATTED_DATEonly, the Unix timestamp of the date/time.relative (
bool, optional) – ForFORMATTED_DATEonly, show as relative time.short_time (
bool, optional) – ForFORMATTED_DATEonly, use short time format.long_time (
bool, optional) – ForFORMATTED_DATEonly, use long time format.short_date (
bool, optional) – ForFORMATTED_DATEonly, use short date format.long_date (
bool, optional) – ForFORMATTED_DATEonly, use long date format.day_of_week (
bool, optional) – ForFORMATTED_DATEonly, include day of week.old_text (
str, optional) – ForDIFF_REPLACEonly, the original text before replacement.