Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mapping = {
- ' ': ' ',
- '0': ':zero:',
- '1': ':one:',
- '2': ':two:',
- '3': ':three:',
- '4': ':four:',
- '5': ':five:',
- '6': ':six:',
- '7': ':seven:',
- '8': ':eight:',
- '9': ':nine:',
- '!': ':grey_exclamation:',
- '?': ':grey_question:',
- '#': ':hash:',
- '*': ':asterisk:'
- };
- 'abcdefghijklmnopqrstuvwxyz'.split('').forEach(c => {
- mapping[c] = mapping[c.toUpperCase()] = ` :regional_indicator_${c}:`;
- });
- if (args.length < 1) return message.channel.send('You must provide some text to emojify!');
- message.channel.send(`Emojify trimis de ${message.author.tag}:`);
- message.channel.send(
- args.join(' ')
- .split('')
- .map(c => mapping[c] || c)
- .join('')
- );
- message.delete().catch();
- exports.conf = {
- enabled: true,
- guildOnly: false,
- aliases: [],
- permLevel: "User"
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement