# messageEntityCustomEmoji

> Represents a custom emoji.

[Back to constructors index](/API_docs/constructors/index.html)



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

### Attributes:

| Name     |    Type       | Required | Description |
|----------|---------------|----------|-------------|
|offset|[int](/API_docs/types/int.html) | Yes|Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length))|
|length|[int](/API_docs/types/int.html) | Yes|Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length))|
|document\_id|[long](/API_docs/types/long.html) | Yes|Document ID of the [custom emoji](https://core.telegram.org/api/custom-emoji), use [messages.getCustomEmojiDocuments](../methods/messages.getCustomEmojiDocuments.html) to fetch the emoji animation and the actual emoji it represents.|



### Type: [MessageEntity](/API_docs/types/MessageEntity.html)


### Example:

```
$messageEntityCustomEmoji = ['_' => 'messageEntityCustomEmoji', 'offset' => int, 'length' => int, 'document_id' => long];
```
