messageEntityCustomEmoji #

Represents a custom emoji.
Note that this entity must wrap exactly one regular emoji (the one contained in documentAttributeCustomEmoji.alt) in the related text, otherwise the server will ignore it.

End-to-end schema #

===144===
messageEntityCustomEmoji#c8cf05f8 offset:int length:int document_id:long = MessageEntity;

API schema #

Layer 223

messageEntityCustomEmoji#c8cf05f8 offset:int length:int document_id:long = MessageEntity;

Parameters #

NameTypeDescription
offsetintOffset of message entity within message (in UTF-16 code units)
lengthintLength of message entity within message (in UTF-16 code units)
document_idlongDocument ID of the custom emoji, use messages.getCustomEmojiDocuments to fetch the emoji animation and the actual emoji it represents.

Type #

MessageEntity

Styled text with message entities #

How to create styled text with message entities

Custom emojis #

Telegram allows including animated and static custom emojis inside of messages.

messages.getCustomEmojiDocuments #

Fetch custom emoji stickers ».

Returns a list of documents with the animated custom emoji in TGS format, and a documentAttributeCustomEmoji attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.

documentAttributeCustomEmoji #

Info about a custom emoji