mirror of
https://github.com/discordjs/discord.js.git
synced 2026-05-31 08:00:07 +00:00
12 lines
210 B
JavaScript
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,
|
|
};
|
|
}
|
|
};
|