How to use the random function from node-emoji
Find comprehensive JavaScript node-emoji.random code examples handpicked from public code repositorys.
54 55 56 57 58 59 60 61 62
var emoji = require('node-emoji'); // Display an emoji picked randomly controller.hears(['random'], 'direct_message,direct_mention', function (bot, message) { var random = emoji.random(); var email = message.user; // Spark User that created the message orginally bot.reply(message, "hey <@personEmail:" + email + ">, type `:" + random.key + ":` to get " + random.emoji); });
47
2
2
9 10 11 12 13 14 15 16 17 18 19 20
// just for testing const createEmojiWorld = emojiCount => { let map = ''; for (let i = 0; i <= emojiCount; i++) { const item = emoji.random(); map += item.emoji; } return map;
0
0
0
node-emoji.get is the most popular function in node-emoji (2342 examples)