Guild emojis
A guild emoji is a custom image that one guild owns and its members use in messages and reactions. To look up one emoji without joining its guild, use Get emoji metadata.
Guild emoji object
Заголовок раздела «Guild emoji object»An emoji as the API returns it.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the emoji |
| name | string | The name of the emoji (2-32 characters) |
| animated | boolean | Whether the image is animated |
| user?1 | partial user object | The account that uploaded the emoji |
1 Only List guild emojis includes it
Example
Заголовок раздела «Example»{ "id": "1501314428688998182", "name": "party_parrot", "animated": true}Emoji create object
Заголовок раздела «Emoji create object»The name and image for one new emoji.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| name | string | The name of the emoji (2-32 characters, ASCII letters, digits and underscore) |
| image1 | base64 string | The emoji image as base64 |
1 You can include a data URL prefix. The decoded image can be at most the emoji_max_size limit key, 524288 bytes by default. The API accepts PNG, JPEG, WebP, GIF, APNG, AVIF, HEIC, HEIF, JXL and SVG, but not animated AVIF
Example
Заголовок раздела «Example»{ "name": "party_parrot", "image": "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEAAAAALAAAAAABAAEAAAI="}Emoji bulk create response object
Заголовок раздела «Emoji bulk create response object»The result of a bulk create, with each submitted item in either success or failed.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| success | array[guild emoji object] | The emojis this request created |
| failed | array[expression creation failure object] | The items Squad rejected |
Expression creation failure object
Заголовок раздела «Expression creation failure object»One item a bulk creation rejected.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| name | string | The name submitted for the item |
| error | string | The failure message, in the account’s locale |
List guild emojis
Заголовок раздела «List guild emojis»/v1/guilds/{guild_id}/emojisReturns the guild’s guild emoji objects, each with the user who uploaded it. An emoji whose uploader cannot be resolved is left out. You need to be a member of the guild.
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | array[guild emoji object] | Emojis were returned |
The rate limit is 60 requests per 10 seconds, on the guild:emojis:list::guild_id bucket.
Create guild emoji
Заголовок раздела «Create guild emoji»/v1/guilds/{guild_id}/emojisCreates an emoji and returns its guild emoji object. You need CREATE_EXPRESSIONS. A guild can have 500 emojis, or the max_guild_emojis limit if the instance sets one. A guild with UNLIMITED_EMOJI can have 999999.
JSON body
Заголовок раздела «JSON body»The body is an emoji create object.
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | guild emoji object | The emoji was created |
| 400 | error response | MAX_EMOJIS when the guild is full, or INVALID_FORM_BODY when the image is too large or in an unsupported format |
| 403 | error response | CONTENT_BLOCKED when the name or image is blocked |
Squad sends a Guild Emojis Update event and records an EMOJI_CREATE audit entry.
The rate limit is 10 requests per 30 seconds, on the guild:emoji:create::guild_id bucket.
Bulk create guild emojis
Заголовок раздела «Bulk create guild emojis»/v1/guilds/{guild_id}/emojis/bulkCreates several emojis in one request and returns an emoji bulk create response object. You need CREATE_EXPRESSIONS.
The response is 200 even when every item fails. An item goes into failed when the guild is full or the API can’t use its image, and the rest of the batch still runs.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| emojis | array[emoji create object] | The emojis to create (1-50) |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | emoji bulk create response object | Squad attempted every item |
| 400 | error response | INVALID_FORM_BODY when the list is empty or over 50 items, or an item has an invalid name |
| 403 | error response | CONTENT_BLOCKED when any item name is blocked, and nothing is created |
Squad sends one Guild Emojis Update event and records an EMOJI_CREATE audit entry for each created emoji.
The rate limit is 6 requests per minute, on the guild:emoji:bulk_create::guild_id bucket.
Clone guild emoji
Заголовок раздела «Clone guild emoji»/v1/guilds/{guild_id}/emojis/cloneCopies an emoji from any guild into the guild in the path and returns the new guild emoji object, which keeps the source emoji’s name. You need CREATE_EXPRESSIONS in the target guild. The source guild needs CLONE_EMOJI_ENABLED.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| source_emoji_id | snowflake | The ID of the emoji to copy |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | guild emoji object | The emoji was cloned |
| 400 | error response | MAX_EMOJIS when the target guild is full |
| 403 | error response | MISSING_ACCESS when the source guild does not allow cloning |
| 404 | error response | UNKNOWN_EMOJI when the source emoji does not exist |
Squad sends a Guild Emojis Update event in the target guild and records an EMOJI_CREATE audit entry.
The rate limit is 10 requests per 30 seconds, on the guild:emoji:clone::guild_id bucket.
Modify guild emoji
Заголовок раздела «Modify guild emoji»/v1/guilds/{guild_id}/emojis/{emoji_id}Renames an emoji and returns its guild emoji object. The uploader needs CREATE_EXPRESSIONS and anyone else needs MANAGE_EXPRESSIONS.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| name | string | The new name of the emoji (2-32 characters, ASCII letters, digits and underscore) |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | guild emoji object | The emoji was renamed |
| 403 | error response | CONTENT_BLOCKED when the name is blocked |
| 404 | error response | UNKNOWN_EMOJI when the emoji is not in this guild |
Squad sends a Guild Emojis Update event and records an EMOJI_UPDATE audit entry.
The rate limit is 20 requests per 10 seconds, on the guild:emoji:update::guild_id bucket.
Delete guild emoji
Заголовок раздела «Delete guild emoji»/v1/guilds/{guild_id}/emojis/{emoji_id}Deletes an emoji. The uploader needs CREATE_EXPRESSIONS and anyone else needs MANAGE_EXPRESSIONS.
Query parameters
Заголовок раздела «Query parameters»| Field | Type | Description |
|---|---|---|
| purge? | boolean | Whether to delete the image file too (default false) |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 204 | empty | The emoji was deleted |
| 403 | error response | MISSING_ACCESS when purge is true without EXPRESSION_PURGE_ALLOWED on the guild |
| 404 | error response | UNKNOWN_EMOJI when the emoji is not in this guild |
Squad sends a Guild Emojis Update event and records an EMOJI_DELETE audit entry.
The guild:emoji:delete::guild_id bucket allows 10 requests per 30 seconds. The guild:emoji:delete:daily::guild_id bucket also allows 300 requests per day.