diff options
| author | Alee14 <alee14498@gmail.com> | 2017-03-26 15:18:10 -0400 |
|---|---|---|
| committer | Alee14 <alee14498@gmail.com> | 2017-03-26 15:18:10 -0400 |
| commit | 29433e2f7dbd0e4a73d3c78ffe1005b922fb5982 (patch) | |
| tree | aa0ad3fe59468cbe452ee597e914839b68c01436 /node_modules/discord.js/src/util/ParseEmoji.js | |
| parent | 878fefb4c4e1f12b804ae5c0def433fa873f4c8b (diff) | |
| download | AleeBot-29433e2f7dbd0e4a73d3c78ffe1005b922fb5982.tar.gz AleeBot-29433e2f7dbd0e4a73d3c78ffe1005b922fb5982.tar.bz2 AleeBot-29433e2f7dbd0e4a73d3c78ffe1005b922fb5982.zip | |
Don't mind me i'm adding the discord.js files
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, + }; + } +}; |
