Files
discord.js/src/util/parseEmoji.js
2016-10-27 15:22:42 +01:00

12 lines
210 B
JavaScript

module.exports = function parseEmoji(text) {
if (text.includes(':')) {
const [name, id] = text.split(':');
return { name, id };
} else {
return {
name: text,
id: null,
};
}
};