// plugins/emojify.js - Convert words to emojis module.exports = { init(bot) { console.log('๐Ÿ˜€ Emojify plugin initialized'); // Word to emoji mappings this.emojiMap = { // Basic emotions & feelings 'happy': '๐Ÿ˜Š', 'sad': '๐Ÿ˜ข', 'angry': '๐Ÿ˜ ', 'love': 'โค๏ธ', 'heart': 'โค๏ธ', 'laugh': '๐Ÿ˜‚', 'cry': '๐Ÿ˜ญ', 'smile': '๐Ÿ˜Š', 'mad': '๐Ÿ˜ก', 'joy': '๐Ÿ˜Š', 'excited': '๐Ÿค—', 'nervous': '๐Ÿ˜ฐ', 'worried': '๐Ÿ˜Ÿ', 'scared': '๐Ÿ˜จ', 'surprised': '๐Ÿ˜ฒ', 'confused': '๐Ÿ˜•', 'tired': '๐Ÿ˜ด', 'sleepy': '๐Ÿ˜ด', 'kiss': '๐Ÿ˜˜', 'wink': '๐Ÿ˜‰', 'cool': '๐Ÿ˜Ž', 'shocked': '๐Ÿ˜ฑ', 'amazing': '๐Ÿคฉ', 'awesome': '๐Ÿคฉ', 'great': '๐Ÿ˜Š', 'wonderful': '๐Ÿ˜', 'terrible': '๐Ÿ˜ญ', 'awful': '๐Ÿ˜–', 'horrible': '๐Ÿ˜ฑ', 'fantastic': '๐Ÿคฉ', 'peaceful': '๐Ÿ˜Œ', 'calm': '๐Ÿ˜Œ', 'relaxed': '๐Ÿ˜Œ', 'stressed': '๐Ÿ˜ฐ', 'disappointed': '๐Ÿ˜ž', 'devastated': '๐Ÿ’”', 'heartbroken': '๐Ÿ’”', 'lonely': '๐Ÿ˜”', 'embarrassed': '๐Ÿ˜ณ', 'proud': '๐Ÿ˜ค', 'confident': '๐Ÿ˜Ž', 'shy': '๐Ÿ˜ณ', 'grateful': '๐Ÿ™', 'thankful': '๐Ÿ™', 'blessed': '๐Ÿ™', 'lucky': '๐Ÿ€', 'funny': '๐Ÿ˜‚', 'hilarious': '๐Ÿ˜‚', 'boring': '๐Ÿ˜ด', 'interesting': '๐Ÿค”', // Animals & creatures 'cat': '๐Ÿฑ', 'dog': '๐Ÿถ', 'bird': '๐Ÿฆ', 'fish': '๐ŸŸ', 'snake': '๐Ÿ', 'horse': '๐Ÿด', 'cow': '๐Ÿ„', 'pig': '๐Ÿท', 'sheep': '๐Ÿ‘', 'chicken': '๐Ÿ”', 'duck': '๐Ÿฆ†', 'frog': '๐Ÿธ', 'monkey': '๐Ÿต', 'elephant': '๐Ÿ˜', 'lion': '๐Ÿฆ', 'tiger': '๐Ÿฏ', 'bear': '๐Ÿป', 'panda': '๐Ÿผ', 'koala': '๐Ÿจ', 'mouse': '๐Ÿญ', 'rabbit': '๐Ÿฐ', 'fox': '๐ŸฆŠ', 'wolf': '๐Ÿบ', 'bee': '๐Ÿ', 'butterfly': '๐Ÿฆ‹', 'spider': '๐Ÿ•ท๏ธ', 'ant': '๐Ÿœ', 'bug': '๐Ÿ›', 'worm': '๐Ÿชฑ', 'fly': '๐Ÿชฐ', 'unicorn': '๐Ÿฆ„', 'dragon': '๐Ÿ‰', 'dinosaur': '๐Ÿฆ•', 'monster': '๐Ÿ‘น', 'pet': '๐Ÿพ', 'pets': '๐Ÿพ', 'animal': '๐Ÿพ', 'animals': '๐Ÿพ', 'puppy': '๐Ÿถ', 'kitten': '๐Ÿฑ', 'baby': '๐Ÿ‘ถ', 'babies': '๐Ÿ‘ถ', // Food and drinks 'pizza': '๐Ÿ•', 'burger': '๐Ÿ”', 'fries': '๐ŸŸ', 'hotdog': '๐ŸŒญ', 'taco': '๐ŸŒฎ', 'sandwich': '๐Ÿฅช', 'bread': '๐Ÿž', 'cheese': '๐Ÿง€', 'meat': '๐Ÿฅฉ', 'chicken': '๐Ÿ—', 'apple': '๐ŸŽ', 'banana': '๐ŸŒ', 'orange': '๐ŸŠ', 'grapes': '๐Ÿ‡', 'strawberry': '๐Ÿ“', 'cherry': '๐Ÿ’', 'peach': '๐Ÿ‘', 'pineapple': '๐Ÿ', 'watermelon': '๐Ÿ‰', 'lemon': '๐Ÿ‹', 'coffee': 'โ˜•', 'tea': '๐Ÿต', 'beer': '๐Ÿบ', 'wine': '๐Ÿท', 'water': '๐Ÿ’ง', 'milk': '๐Ÿฅ›', 'juice': '๐Ÿงƒ', 'cake': '๐ŸŽ‚', 'cookie': '๐Ÿช', 'chocolate': '๐Ÿซ', 'icecream': '๐Ÿฆ', 'donut': '๐Ÿฉ', 'candy': '๐Ÿฌ', 'food': '๐Ÿฝ๏ธ', 'eat': '๐Ÿฝ๏ธ', 'eating': '๐Ÿฝ๏ธ', 'meal': '๐Ÿฝ๏ธ', 'dinner': '๐Ÿฝ๏ธ', 'lunch': '๐Ÿฝ๏ธ', 'breakfast': '๐Ÿฝ๏ธ', 'snack': '๐Ÿฟ', 'hungry': '๐Ÿฝ๏ธ', 'drink': '๐Ÿฅค', 'drinking': '๐Ÿฅค', 'thirsty': '๐Ÿฅค', 'soda': '๐Ÿฅค', 'restaurant': '๐Ÿฝ๏ธ', 'kitchen': '๐Ÿณ', 'cooking': '๐Ÿณ', 'cook': '๐Ÿณ', 'delicious': '๐Ÿ˜‹', 'yummy': '๐Ÿ˜‹', 'tasty': '๐Ÿ˜‹', 'spicy': '๐ŸŒถ๏ธ', 'sweet': '๐Ÿฏ', 'sour': '๐Ÿ‹', 'healthy': '๐Ÿฅ—', // Weather & nature 'sun': 'โ˜€๏ธ', 'sunny': 'โ˜€๏ธ', 'moon': '๐ŸŒ™', 'star': 'โญ', 'cloud': 'โ˜๏ธ', 'cloudy': 'โ˜๏ธ', 'rain': '๐ŸŒง๏ธ', 'rainy': '๐ŸŒง๏ธ', 'snow': 'โ„๏ธ', 'snowy': 'โ„๏ธ', 'storm': 'โ›ˆ๏ธ', 'thunder': 'โ›ˆ๏ธ', 'lightning': 'โšก', 'wind': '๐Ÿ’จ', 'hot': '๐Ÿ”ฅ', 'cold': '๐ŸงŠ', 'fire': '๐Ÿ”ฅ', 'ice': '๐ŸงŠ', 'rainbow': '๐ŸŒˆ', 'weather': '๐ŸŒค๏ธ', 'temperature': '๐ŸŒก๏ธ', 'warm': 'โ˜€๏ธ', 'freezing': '๐ŸงŠ', 'foggy': '๐ŸŒซ๏ธ', 'fog': '๐ŸŒซ๏ธ', 'tornado': '๐ŸŒช๏ธ', 'hurricane': '๐ŸŒ€', 'nature': '๐ŸŒฟ', 'forest': '๐ŸŒฒ', 'tree': '๐ŸŒณ', 'flower': '๐ŸŒธ', 'grass': '๐ŸŒฑ', 'plant': '๐ŸŒฑ', 'garden': '๐ŸŒป', 'leaf': '๐Ÿƒ', 'rose': '๐ŸŒน', 'desert': '๐Ÿœ๏ธ', 'mountain': 'โ›ฐ๏ธ', 'ocean': '๐ŸŒŠ', 'sea': '๐ŸŒŠ', 'beach': '๐Ÿ–๏ธ', 'sky': 'โ˜๏ธ', 'earth': '๐ŸŒ', 'world': '๐ŸŒ', 'planet': '๐ŸŒ', // Transportation 'car': '๐Ÿš—', 'bus': '๐ŸšŒ', 'train': '๐Ÿš‚', 'plane': 'โœˆ๏ธ', 'ship': '๐Ÿšข', 'bike': '๐Ÿšด', 'bicycle': '๐Ÿšด', 'motorcycle': '๐Ÿ๏ธ', 'truck': '๐Ÿšš', 'taxi': '๐Ÿš•', 'rocket': '๐Ÿš€', 'helicopter': '๐Ÿš', 'boat': 'โ›ต', 'drive': '๐Ÿš—', 'driving': '๐Ÿš—', 'fly': 'โœˆ๏ธ', 'flying': 'โœˆ๏ธ', 'ride': '๐Ÿš—', 'travel': '๐Ÿงณ', 'trip': '๐Ÿงณ', 'vacation': '๐Ÿ–๏ธ', 'road': '๐Ÿ›ฃ๏ธ', 'traffic': '๐Ÿšฆ', 'airport': 'โœˆ๏ธ', // Technology 'computer': '๐Ÿ’ป', 'phone': '๐Ÿ“ฑ', 'tv': '๐Ÿ“บ', 'camera': '๐Ÿ“ท', 'game': '๐ŸŽฎ', 'internet': '๐ŸŒ', 'email': '๐Ÿ“ง', 'message': '๐Ÿ’ฌ', 'robot': '๐Ÿค–', 'battery': '๐Ÿ”‹', 'wifi': '๐Ÿ“ถ', 'code': '๐Ÿ’ป', 'coding': '๐Ÿ’ป', 'programming': '๐Ÿ’ป', 'technology': '๐Ÿ’ป', 'tech': '๐Ÿ’ป', 'digital': '๐Ÿ’ป', 'online': '๐ŸŒ', 'website': '๐ŸŒ', 'software': '๐Ÿ’ป', 'app': '๐Ÿ“ฑ', 'video': '๐Ÿ“น', 'photo': '๐Ÿ“ท', 'picture': '๐Ÿ“ท', 'screen': '๐Ÿ“บ', 'laptop': '๐Ÿ’ป', 'headphones': '๐ŸŽง', 'data': '๐Ÿ’พ', 'password': '๐Ÿ”’', // Activities 'work': '๐Ÿ’ผ', 'school': '๐Ÿซ', 'study': '๐Ÿ“š', 'read': '๐Ÿ“–', 'write': 'โœ๏ธ', 'music': '๐ŸŽต', 'dance': '๐Ÿ’ƒ', 'sing': '๐ŸŽค', 'play': '๐ŸŽฎ', 'sport': 'โšฝ', 'football': '๐Ÿˆ', 'soccer': 'โšฝ', 'basketball': '๐Ÿ€', 'tennis': '๐ŸŽพ', 'swim': '๐ŸŠ', 'run': '๐Ÿƒ', 'walk': '๐Ÿšถ', 'exercise': '๐Ÿ’ช', 'gym': '๐Ÿ‹๏ธ', 'sleep': '๐Ÿ˜ด', 'dream': '๐Ÿ’ญ', 'party': '๐ŸŽ‰', 'celebrate': '๐ŸŽ‰', 'job': '๐Ÿ’ผ', 'office': '๐Ÿข', 'meeting': '๐Ÿ‘ฅ', 'learn': '๐Ÿ“š', 'homework': '๐Ÿ“', 'test': '๐Ÿ“', 'hobby': '๐ŸŽจ', 'fun': '๐ŸŽ‰', 'movie': '๐ŸŽฌ', 'film': '๐ŸŽฌ', 'show': '๐Ÿ“บ', 'art': '๐ŸŽจ', 'paint': '๐ŸŽจ', 'draw': 'โœ๏ธ', 'shopping': '๐Ÿ›’', 'shop': '๐Ÿช', 'buy': '๐Ÿ’ฐ', 'cook': '๐Ÿณ', 'clean': '๐Ÿงน', 'relax': '๐Ÿ˜Œ', // Objects 'house': '๐Ÿ ', 'home': '๐Ÿ ', 'building': '๐Ÿข', 'book': '๐Ÿ“š', 'pen': 'โœ๏ธ', 'pencil': 'โœ๏ธ', 'paper': '๐Ÿ“„', 'money': '๐Ÿ’ฐ', 'gift': '๐ŸŽ', 'present': '๐ŸŽ', 'key': '๐Ÿ”‘', 'door': '๐Ÿšช', 'clock': '๐Ÿ•', 'time': 'โฐ', 'watch': 'โŒš', 'glasses': '๐Ÿ‘“', 'hat': '๐Ÿ‘’', 'shirt': '๐Ÿ‘•', 'shoes': '๐Ÿ‘Ÿ', 'bag': '๐Ÿ‘œ', 'chair': '๐Ÿช‘', 'table': '๐Ÿช‘', 'bed': '๐Ÿ›๏ธ', 'lamp': '๐Ÿ’ก', 'light': '๐Ÿ’ก', 'mirror': '๐Ÿชž', 'tool': '๐Ÿ”ง', 'hammer': '๐Ÿ”จ', 'box': '๐Ÿ“ฆ', 'bottle': '๐Ÿผ', 'cup': 'โ˜•', 'plate': '๐Ÿฝ๏ธ', // Colors 'red': '๐Ÿ”ด', 'blue': '๐Ÿ”ต', 'green': '๐ŸŸข', 'yellow': '๐ŸŸก', 'orange': '๐ŸŸ ', 'purple': '๐ŸŸฃ', 'black': 'โšซ', 'white': 'โšช', 'pink': '๐Ÿฉท', 'brown': '๐ŸคŽ', 'color': '๐ŸŒˆ', 'bright': 'โœจ', 'dark': 'โšซ', // Numbers 'one': '1๏ธโƒฃ', 'two': '2๏ธโƒฃ', 'three': '3๏ธโƒฃ', 'four': '4๏ธโƒฃ', 'five': '5๏ธโƒฃ', 'six': '6๏ธโƒฃ', 'seven': '7๏ธโƒฃ', 'eight': '8๏ธโƒฃ', 'nine': '9๏ธโƒฃ', 'ten': '๐Ÿ”Ÿ', '1': '1๏ธโƒฃ', '2': '2๏ธโƒฃ', '3': '3๏ธโƒฃ', '4': '4๏ธโƒฃ', '5': '5๏ธโƒฃ', '6': '6๏ธโƒฃ', '7': '7๏ธโƒฃ', '8': '8๏ธโƒฃ', '9': '9๏ธโƒฃ', '10': '๐Ÿ”Ÿ', 'first': '1๏ธโƒฃ', 'second': '2๏ธโƒฃ', 'third': '3๏ธโƒฃ', // Directions 'up': 'โฌ†๏ธ', 'down': 'โฌ‡๏ธ', 'left': 'โฌ…๏ธ', 'right': 'โžก๏ธ', 'north': 'โฌ†๏ธ', 'south': 'โฌ‡๏ธ', 'east': 'โžก๏ธ', 'west': 'โฌ…๏ธ', 'here': '๐Ÿ“', 'there': '๐Ÿ‘‰', // Actions 'stop': '๐Ÿ›‘', 'go': 'โœ…', 'yes': 'โœ…', 'no': 'โŒ', 'ok': '๐Ÿ‘Œ', 'good': '๐Ÿ‘', 'bad': '๐Ÿ‘Ž', 'like': '๐Ÿ‘', 'help': '๐Ÿ†˜', 'start': 'โ–ถ๏ธ', 'end': 'โน๏ธ', 'open': '๐Ÿ”“', 'close': '๐Ÿ”’', 'give': '๐Ÿคฒ', 'take': 'โœ‹', 'throw': '๐Ÿคพ', 'jump': '๐Ÿฆ˜', 'win': '๐Ÿ†', 'lose': '๐Ÿ˜ž', 'try': '๐Ÿ’ช', 'talk': '๐Ÿ’ฌ', 'listen': '๐Ÿ‘‚', 'see': '๐Ÿ‘๏ธ', 'look': '๐Ÿ‘๏ธ', 'watch': '๐Ÿ‘๏ธ', // Symbols 'question': 'โ“', 'idea': '๐Ÿ’ก', 'magic': 'โœจ', 'star': 'โญ', 'diamond': '๐Ÿ’Ž', 'crown': '๐Ÿ‘‘', 'trophy': '๐Ÿ†', 'flag': '๐Ÿณ๏ธ', 'peace': 'โ˜ฎ๏ธ', 'power': '๐Ÿ’ช', 'energy': 'โšก', 'speed': '๐Ÿ’จ', 'big': '๐Ÿ”ต', 'small': '๐Ÿ”ธ', 'fast': '๐Ÿ’จ', 'slow': '๐ŸŒ', // Places 'city': '๐Ÿ™๏ธ', 'park': '๐Ÿž๏ธ', 'hospital': '๐Ÿฅ', 'bank': '๐Ÿฆ', 'church': 'โ›ช', 'library': '๐Ÿ“š', 'cafe': 'โ˜•', 'hotel': '๐Ÿจ', // Body parts 'face': '๐Ÿ˜Š', 'eye': '๐Ÿ‘๏ธ', 'nose': '๐Ÿ‘ƒ', 'hand': 'โœ‹', 'finger': '๐Ÿ‘†', 'hair': '๐Ÿ’‡', 'teeth': '๐Ÿฆท', 'brain': '๐Ÿง ', // Time 'morning': '๐ŸŒ…', 'afternoon': 'โ˜€๏ธ', 'evening': '๐ŸŒ‡', 'night': '๐ŸŒ™', 'today': '๐Ÿ“…', 'tomorrow': '๐Ÿ“…', 'birthday': '๐ŸŽ‚' }; // Common words that should sometimes be replaced with contextual emojis this.contextualMap = { 'and': 'โž•', 'with': '๐Ÿค', 'very': 'โญ', 'really': 'โญ', 'maybe': '๐Ÿค”', 'definitely': 'โœ…', 'finally': '๐ŸŽ‰', 'quickly': '๐Ÿ’จ', 'slowly': '๐ŸŒ', 'never': 'โŒ', 'always': 'โ™พ๏ธ', 'everywhere': '๐ŸŒ', 'everyone': '๐Ÿ‘ฅ', 'everything': '๐ŸŒ' }; }, cleanup(bot) { console.log('๐Ÿ˜€ Emojify plugin cleaned up'); }, emojifyText(text) { if (!text || text.trim().length === 0) { return 'Please provide a message to emojify! ๐Ÿ˜Š'; } // Split into words and process each one const words = text.toLowerCase().split(/\s+/); const result = []; for (let word of words) { // Remove punctuation for matching but keep it for display const cleanWord = word.replace(/[^\w]/g, ''); const punctuation = word.replace(/[\w]/g, ''); // Check for direct emoji match if (this.emojiMap[cleanWord]) { result.push(this.emojiMap[cleanWord] + punctuation); } // Check for contextual matches (use sparingly) else if (this.contextualMap[cleanWord] && Math.random() < 0.3) { result.push(this.contextualMap[cleanWord] + punctuation); } // Check for partial matches (plurals, etc.) else { let found = false; // Try removing common suffixes const suffixes = ['s', 'es', 'ed', 'ing', 'ly', 'er', 'est']; for (const suffix of suffixes) { if (cleanWord.endsWith(suffix)) { const root = cleanWord.slice(0, -suffix.length); if (this.emojiMap[root]) { result.push(this.emojiMap[root] + punctuation); found = true; break; } } } // If no match found, keep original word if (!found) { result.push(word); } } } return result.join(' '); }, commands: [ { name: 'emojify', description: 'Convert words in a message to emojis', execute: function(context, bot) { const plugin = module.exports; const target = context.replyTo; const from = context.nick; const args = context.args; if (args.length === 0) { bot.say(target, `${from}: Usage: !emojify `); return; } const message = args.join(' '); const emojified = plugin.emojifyText(message); bot.say(target, `๐Ÿ˜€ ${emojified}`); } }, { name: 'emojihelp', description: 'Show some example words that can be emojified', execute: function(context, bot) { const plugin = module.exports; const target = context.replyTo; const examples = [ 'happy sad angry love', 'cat dog bird fish', 'pizza coffee beer cake', 'sun rain snow fire', 'car plane train bike', 'work sleep party dance' ]; const randomExample = examples[Math.floor(Math.random() * examples.length)]; const emojified = plugin.emojifyText(randomExample); bot.say(target, `๐Ÿ“ Example: "${randomExample}" becomes "${emojified}"`); bot.say(target, `๐Ÿ’ก Try words like: animals, food, weather, emotions, activities, colors, numbers!`); } }, { name: 'emojicount', description: 'Show how many words can be emojified', execute: function(context, bot) { const plugin = module.exports; const target = context.replyTo; const totalWords = Object.keys(plugin.emojiMap).length; const contextualWords = Object.keys(plugin.contextualMap).length; bot.say(target, `๐Ÿ“Š I know ${totalWords} emoji replacements + ${contextualWords} contextual ones = ${totalWords + contextualWords} total!`); } } ] };