Skip to content

emoji_update

Change an existing custom emoji’s name, image, or both. The emoji keeps its ID.

{
"cmd": "emoji_update",
"emoji_id": "4",
"name": "parrot"
}
Field Type Required Description
emoji_id string or integer Yes The emoji’s ID. Must be digits only.
name string No New name. Same rules as emoji_add: 1 to 64 letters, digits, or underscores.
image string No New image as a base64 data URI. Same rules as emoji_add.

Send at least one of name or image. Fields you leave out stay the same.

{
"cmd": "emoji_update",
"id": "4",
"name": "parrot",
"fileName": "4.gif",
"updated": true
}

If nothing changed, the response is { "cmd": "emoji_update", "id": "4", "updated": false }. That happens when:

  • no emoji has that ID, or
  • another emoji already uses the new name, ignoring case.

A new image with a different type changes fileName, for example from 4.gif to 4.png. The old file is deleted.

The server doesn’t broadcast the change.

Requires manage_emojis. A user in timeout gets a rate_limit frame instead.

val When
Invalid emoji_update data: emoji_id must be an integer emoji_id is missing or isn’t a non-negative whole number. This is checked first.
value: Expected a value for at least one of [name image] Neither name nor image was sent.
name: Expected string, received number name or image isn’t a string.
Invalid emoji_update data: Invalid name The new name breaks the naming rules.
Invalid emoji_update data: Image must be a base64 data URI image isn’t in the form data:image/<type>;base64,<data>.
Invalid emoji_update data: Unsupported image type The image type isn’t in uploads.emoji_allowed_file_types.
Invalid emoji_update data: Invalid image data The data is empty, isn’t valid base64, or doesn’t match the declared type.
Invalid emoji_update data: Custom asset storage is unavailable The emoji index file can’t be read.
Invalid emoji_update data: Failed to save custom asset The change couldn’t be written.