discord-emojis-parser
v1.0.6
Published
Accurately parse any unicode emojis that are supported by discord
Downloads
64
Maintainers
Readme
discord-emojis-parser package
This package is used to parse discord unicode emojis from a text, with name
, svg image
Example: Using Unicodes
const EmojiParser=require('discord-emojis-parser');
let text=`Hello world 🌍!
I'm alone here? 😭`
console.log(EmojiParser.parse(text))
// Output
// [
// {
// name: 'earth_africa',
// svg: 'https://discord.com/assets/..svg',
// unicode: '🌍',
// representation: 'earth_africa'
// },
// {
// name: 'sob',
// svg: 'https://discord.com/assets/..svg',
// unicode: '😭',
// representation: 'sob'
// }
// ]
Example: Using Represenatives
const EmojiParser=require('discord-emojis-parser');
let text=`Hello world :earth_africa:!
I'm alone here? :sob:`
console.log(EmojiParser.parse(text))
// Output
// [
// {
// name: 'earth_africa',
// svg: 'https://discord.com/assets/....svg',
// unicode: '🌍',
// representation: 'earth_africa'
// },
// {
// name: 'sob',
// svg: 'https://discord.com/assets/....svg',
// unicode: '😭',
// representation: 'sob'
// }
// ]