Adding emojis
Drop the images
Put the images in the emojis/ folder. The file name, without its extension, becomes the emoji name on Discord.
emojis/
happy.png
sad.png
party.gif
thinking.png
Supported formats:
- PNG (
.png) - Animated GIF (
.gif) - JPEG (
.jpg,.jpeg) - APNG (
.apng) - WebP (
.webp) - AVIF (
.avif)
Naming rules
Discord only accepts names of 2 to 32 characters: letters, digits and underscores. A flag-fr.png file is refused.
glyph build checks every name before contacting Discord. If one is invalid, it stops without uploading or deleting anything, and suggests the name to use:
❌ 1 emoji name(s) Discord will refuse (2 to 32 characters, letters, digits and underscores only) :
→ "flag-fr" — rename the file to "flag_fr"
Nothing was uploaded or deleted.
Sync
npx glyph build
The build:
- scans the
emojis/folder; - fetches the application's emojis from Discord;
- deletes from Discord the emojis that no longer exist locally;
- uploads the new emojis;
- generates the
list.jsonandemojis.d.tsindex files.
The comparison is by name. Replacing a file's image without renaming it does not upload it again: to update an emoji, remove it, run glyph build, then add it back.
The local folder is authoritative: an application emoji missing from the folder is deleted from Discord on the next build, even if it was added by hand in the developer portal.
Generated files
emojis/list.json holds the application's emojis and is read by Glyph.init():
[
{"id": "794367836033515531", "name": "happy", "animated": false},
{"id": "917871943041048636", "name": "party", "animated": true}
]
emojis/emojis.d.ts declares the types, see TypeScript.
list.json is in .gitignore: regenerate it with glyph build after each clone and when deploying. Do commit the images.