Skip to main content

Glyph

Glyph manages the application emojis of your Discord bots: you drop images into a folder, one command syncs them with Discord, and your code uses them by name, with TypeScript autocompletion.

  • A folder as the source of truth: every file becomes an emoji, named after the file.
  • Sync in one command: glyph build uploads new emojis and deletes the ones that are gone.
  • Names checked before anything is sent: a name Discord would refuse stops the build before it touches anything.
  • Generated types: emoji names are a TypeScript union, with autocompletion.
  • A minimal API to get an emoji, its Discord identifier or its compact form.
  • Works with REST proxies and Discord simulators, through a configurable API root.

Example​

emojis/
happy.png
party.gif
npx glyph build
import Glyph from '@fca.gg/glyph';

Glyph.init();

Glyph.identifier('happy'); // "<:happy:794367836033515531>"
Glyph.identifier('party'); // "<a:party:917871943041048636>"

To get started, follow the installation.

License​

Glyph is released under the AGPL v3 license with a linking exception: using it as a dependency does not require your application to be open source. Only changes to Glyph itself are subject to the AGPL. The source code is on GitHub.