From 29433e2f7dbd0e4a73d3c78ffe1005b922fb5982 Mon Sep 17 00:00:00 2001 From: Alee14 Date: Sun, 26 Mar 2017 15:18:10 -0400 Subject: Don't mind me i'm adding the discord.js files --- node_modules/discord.js/src/util/ParseEmoji.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 node_modules/discord.js/src/util/ParseEmoji.js (limited to 'node_modules/discord.js/src/util/ParseEmoji.js') 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, + }; + } +}; -- cgit v1.2.3