https://github.com/nicpwns/random-unicode-emoji
A simple JavaScript package that returns random Unicode emojis. ๐
https://github.com/nicpwns/random-unicode-emoji
discord discord-bot discord-js emoji javascript node nodejs npm npm-package npmjs random unicode unicode-characters
Last synced: 8 months ago
JSON representation
A simple JavaScript package that returns random Unicode emojis. ๐
- Host: GitHub
- URL: https://github.com/nicpwns/random-unicode-emoji
- Owner: NicPWNs
- Created: 2016-03-28T19:12:38.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T23:16:08.000Z (over 3 years ago)
- Last Synced: 2024-10-12T08:03:53.847Z (over 1 year ago)
- Topics: discord, discord-bot, discord-js, emoji, javascript, node, nodejs, npm, npm-package, npmjs, random, unicode, unicode-characters
- Homepage: https://www.npmjs.com/random-unicode-emoji
- Size: 41 KB
- Stars: 13
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# random-unicode-emoji
[](https://www.npmjs.com/package/random-unicode-emoji)
[](https://www.unicode.org/Public/emoji/15.0/)
[](https://www.npmjs.com/package/random-unicode-emoji)
[](https://github.com/NicPWNs/random-unicode-emoji/stargazers)
[](https://github.com/NicPWNs/random-unicode-emoji/forks)
[](https://github.com/NicPWNs/random-unicode-emoji)
[](https://github.com/NicPWNs/random-unicode-emoji/issues)
A simple JavaScript package that returns random Unicode emojis. ๐
> Like this repo? Give it a [โญ on GitHub!](https://github.com/NicPWNs/random-unicode-emoji)
## Install โจ
```bash
npm install random-unicode-emoji
```
> No dependencies!
## Usage ๐
```js
// Require the module
var randomEmoji = require('random-unicode-emoji');
// Use the module
randomEmoji.random({count: 3});
// -> ["๐ธ", "๐", "๐ฃ"]
// Add custom emoji
randomEmoji.random({count: 3, custom: ['(ยฐ อส อกยฐ)','(โฏยฐโกยฐ)โฏ๏ธต โปโโป']});
// -> ["๐ฅ", "(ยฐ อส อกยฐ)", "โพ"]
```
### Discord Bots
This package is very popular among Discord bots.
Below is an example of using the custom emoji feature to include custom Discord emojis.
```js
randomEmoji.random({count: 3, custom: message.guild.emojis.map()});
// -> ["๐คก", "<:HUH:1081269950800466059>", "๐ธ"]
```
> `<:HUH:1081269950800466059>` translates to an emoji for a specific Discord guild.
## Update โ๏ธ
```bash
npm update random-unicode-emoji
```
## Unicode
Uses Unicode Standard Emoji from [Unicode.org](https://www.unicode.org/Public/emoji/)
> Currently supports the latest [Unicode Standard Version 15.0](https://www.unicode.org/Public/emoji/15.0/)
## Language
This is the JavaScript ๐ version. There is also a [Python ๐](https://github.com/NicPWNs/random-unicode-emoji-py) and [Rust โ๏ธ](https://github.com/NicPWNs/random-unicode-emoji-rs) version.
## Maintainer
[Nic Jones, (@NicPWNs)](https://github.com/NicPWNs)
## Credit
Originally created by [Pirijan, (@pketh)](https://github.com/pketh)