diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-03-06 15:51:32 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-03-06 15:51:32 +0100 |
commit | 528df91cdb4618fff69ede49a381e49fe16afc93 (patch) | |
tree | 7546639d0db6457d05b144f29caff6991dbe3b36 | |
parent | f657368ee29bdb8bab473e3cbedf936daec89cdd (diff) | |
download | furrybot-discord-528df91cdb4618fff69ede49a381e49fe16afc93.tar.xz |
Add emojify command
-rw-r--r-- | http.js | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -81,5 +81,21 @@ module.exports = { func: msg => fetch("https://8ball.delegator.com/magic/JSON/whatever") .then(res => res.json()) .then(data => msg.reply(data.magic.answer)) + }, + emojify: { + func: (msg, text) => fetch("https://api.emojify.net/convert", { + method: "POST", + headers: { + "Accept": "application/json", + "Content-Type": "application/json", + }, + body: JSON.stringify({ + density: 100, + input: text.join(" "), + shouldFilterEmojis: false, + }), + }) + .then(res => res.json()) + .then(data => msg.reply(data.result)) } } |