A simple JavaScript package that returns random Unicode emojis. 📜
Like this repo? Give it a ⭐ on GitHub!
npm install random-unicode-emoji
No dependencies!
// Require the module
var randomEmoji = require('random-unicode-emoji');
// Use the module
randomEmoji.random({count: 3});
// -> ["🐸", "🍇", "🚣"]
// Add custom emoji
randomEmoji.random({count: 3, custom: ['(° ͜ʖ ͡°)','(╯°□°)╯︵ ┻━┻']});
// -> ["🔥", "(° ͜ʖ ͡°)", "⚾"]
This package is very popular among Discord bots. Below is an example of using the custom emoji feature to include custom Discord emojis.
randomEmoji.random({count: 3, custom: message.guild.emojis.map()});
// -> ["🤡", "<:HUH:1081269950800466059>", "😸"]
<:HUH:1081269950800466059>
translates to an emoji for a specific Discord guild.
npm update random-unicode-emoji
Uses Unicode Standard Emoji from Unicode.org
Currently supports the latest Unicode Standard Version 15.0
This is the JavaScript 📜 version. There is also a Python 🐍 and Rust ⚙️ version.
Originally created by Pirijan, (@pketh)