diff options
Diffstat (limited to 'node_modules/discord.js/src/util/ParseEmoji.js')
| -rw-r--r-- | node_modules/discord.js/src/util/ParseEmoji.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/discord.js/src/util/ParseEmoji.js b/node_modules/discord.js/src/util/ParseEmoji.js new file mode 100644 index 0000000..d9f7b22 --- /dev/null +++ b/node_modules/discord.js/src/util/ParseEmoji.js @@ -0,0 +1,14 @@ +module.exports = function parseEmoji(text) { + if (text.includes('%')) { + text = decodeURIComponent(text); + } + if (text.includes(':')) { + const [name, id] = text.split(':'); + return { name, id }; + } else { + return { + name: text, + id: null, + }; + } +}; |
