Skip to content

Instantly share code, notes, and snippets.

@DarkSeraphim
Created November 12, 2018 22:34
Show Gist options
  • Select an option

  • Save DarkSeraphim/761f4df7430dd862ae99a55e28301fac to your computer and use it in GitHub Desktop.

Select an option

Save DarkSeraphim/761f4df7430dd862ae99a55e28301fac to your computer and use it in GitHub Desktop.
Utility to map Discord unicode emojis from a tag to their unicode character
const discordEmoji = require("discord-emoji")
module.exports = discordEmoji;
module.exports.emojis =
Object.values(discordEmoji)
.reduce((map, emojis) => {
return Object.entries(emojis).reduce((map, [name, unicode]) => {
return map.set(name, unicode);
}, map);
}, new Map());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment