diff --git a/docs/source/topics/text-formatting.rst b/docs/source/topics/text-formatting.rst index 4e11fb74..00aa0cf8 100644 --- a/docs/source/topics/text-formatting.rst +++ b/docs/source/topics/text-formatting.rst @@ -122,6 +122,8 @@ To strictly use this mode, pass :obj:`~pyrogram.enums.HTML` to the *parse_mode* inline fixed-width code + 🔥 +
     pre-formatted
       fixed-width
diff --git a/pyrogram/parser/html.py b/pyrogram/parser/html.py
index d9a8d368..29c8c4a6 100644
--- a/pyrogram/parser/html.py
+++ b/pyrogram/parser/html.py
@@ -75,6 +75,10 @@ class Parser(HTMLParser):
             else:
                 entity = raw.types.MessageEntityTextUrl
                 extra["url"] = url
+        elif tag == "emoji":
+            entity = raw.types.MessageEntityCustomEmoji
+            custom_emoji_id = int(attrs.get("id"))
+            extra["document_id"] = custom_emoji_id
         else:
             return
 
@@ -185,6 +189,10 @@ class HTML:
                 user = entity.user
                 start_tag = f''
                 end_tag = ""
+            elif entity_type == MessageEntityType.CUSTOM_EMOJI:
+                custom_emoji_id = entity.custom_emoji_id
+                start_tag = f''
+                end_tag = ""
             else:
                 continue