2024-08-06 14:59:21 +02:00
export const metadata = {
title: 'Emoji',
description: 'Definition of the Emoji structure',
}
# Custom Emoji
<Note>
2024-08-13 16:47:37 +02:00
This structure is part of the [Custom Emojis](/extensions/custom-emojis) extension. As such, it is not part of the core Versia specification.
2024-08-06 14:59:21 +02:00
If you are not implementing the Custom Emojis extension, you can ignore this structure.
</Note>
## Entity Definition
<Row>
<Col>
<Properties>
<Property name="name" type="string" required={true}>
2024-08-18 16:11:45 +02:00
Emoji name, surrounded by identification characters (for example, colons: `:happy_face:`).
2024-08-06 14:59:21 +02:00
Name must match the regex `^[a-zA-Z0-9_-]+$`.
2024-08-18 16:11:45 +02:00
Identification characters must not match the name regex (must not be alphanumeric/underscore/hyphen). There may only be two identification characters, one at the beginning and one at the end.
2024-08-06 14:59:21 +02:00
</Property>
<Property name="content" type="ContentFormat" required={true} typeLink="/structures/content-format">
Emoji content. Must be an image format (`image/*`).
</Property>
</Properties>
</Col>
<Col sticky>
```jsonc {{ 'title': 'Example Emoji' }}
{
"name": ":happy_face:",
"content": {
"image/webp": {
"content": "https://cdn.example.com/emojis/happy_face.webp",
"remote": true,
"description": "A happy emoji smiling.",
}
}
}
```
</Col>
</Row>