MessageEntityType

class hydrogram.enums.MessageEntityType[source]

Message entity type enumeration used in MessageEntity.

MENTION = <class 'hydrogram.raw.types.message_entity_mention.MessageEntityMention'>

@username

HASHTAG = <class 'hydrogram.raw.types.message_entity_hashtag.MessageEntityHashtag'>

#hashtag

CASHTAG = <class 'hydrogram.raw.types.message_entity_cashtag.MessageEntityCashtag'>

$USD

BOT_COMMAND = <class 'hydrogram.raw.types.message_entity_bot_command.MessageEntityBotCommand'>

/start@hydrogrambot

URL = <class 'hydrogram.raw.types.message_entity_url.MessageEntityUrl'>

https://hydrogram.org (see url)

EMAIL = <class 'hydrogram.raw.types.message_entity_email.MessageEntityEmail'>

do-not-reply@hydrogram.org

PHONE_NUMBER = <class 'hydrogram.raw.types.message_entity_phone.MessageEntityPhone'>

+1-123-456-7890

BOLD = <class 'hydrogram.raw.types.message_entity_bold.MessageEntityBold'>

Bold text

ITALIC = <class 'hydrogram.raw.types.message_entity_italic.MessageEntityItalic'>

Italic text

UNDERLINE = <class 'hydrogram.raw.types.message_entity_underline.MessageEntityUnderline'>

Underlined text

STRIKETHROUGH = <class 'hydrogram.raw.types.message_entity_strike.MessageEntityStrike'>

Strikethrough text

SPOILER = <class 'hydrogram.raw.types.message_entity_spoiler.MessageEntitySpoiler'>

Spoiler text

CODE = <class 'hydrogram.raw.types.message_entity_code.MessageEntityCode'>

Monowidth string

PRE = <class 'hydrogram.raw.types.message_entity_pre.MessageEntityPre'>

Monowidth block (see language)

BLOCKQUOTE = <class 'hydrogram.raw.types.message_entity_blockquote.MessageEntityBlockquote'>

Blockquote text

For clickable text URLs

TEXT_MENTION = <class 'hydrogram.raw.types.message_entity_mention_name.MessageEntityMentionName'>

for users without usernames (see user)

BANK_CARD = <class 'hydrogram.raw.types.message_entity_bank_card.MessageEntityBankCard'>

Bank card text

CUSTOM_EMOJI = <class 'hydrogram.raw.types.message_entity_custom_emoji.MessageEntityCustomEmoji'>

Custom emoji

UNKNOWN = <class 'hydrogram.raw.types.message_entity_unknown.MessageEntityUnknown'>

Unknown message entity type