I am trying to check if string is only '' and not '' or doesn't contain more than 1 emoji.
My current code:
await msg.edit('Testing if it\'s a emoji');
try {
await msg.react(given);
await msg.reactions.removeAll();
emoji = given;
} catch (err) {
await msg.edit(`You did not provide a valid emoji. Please try again.`);
break;
}
I don't know if its efficient this way. Could you tell me the best way to detect if string has ONLY one emoji?
I found some stackoverflow questions but most of them allow more than 1 emoji. I want it to detect if it has only 1 emoji.