Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. const mapping = {
  2. ' ': ' ',
  3. '0': ':zero:',
  4. '1': ':one:',
  5. '2': ':two:',
  6. '3': ':three:',
  7. '4': ':four:',
  8. '5': ':five:',
  9. '6': ':six:',
  10. '7': ':seven:',
  11. '8': ':eight:',
  12. '9': ':nine:',
  13. '!': ':grey_exclamation:',
  14. '?': ':grey_question:',
  15. '#': ':hash:',
  16. '*': ':asterisk:'
  17. };
  18.  
  19. 'abcdefghijklmnopqrstuvwxyz'.split('').forEach(c => {
  20. mapping[c] = mapping[c.toUpperCase()] = ` :regional_indicator_${c}:`;
  21. });
  22.  
  23.  
  24.  
  25. if (args.length < 1) return message.channel.send('You must provide some text to emojify!');
  26.  
  27.  
  28. message.channel.send(`Emojify trimis de ${message.author.tag}:`);
  29.  
  30. message.channel.send(
  31. args.join(' ')
  32. .split('')
  33. .map(c => mapping[c] || c)
  34. .join('')
  35. );
  36. message.delete().catch();
  37.  
  38. exports.conf = {
  39. enabled: true,
  40. guildOnly: false,
  41. aliases: [],
  42. permLevel: "User"
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement