From 528df91cdb4618fff69ede49a381e49fe16afc93 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 6 Mar 2022 15:51:32 +0100 Subject: [PATCH] Add emojify command --- http.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/http.js b/http.js index 4572419..f30ed6b 100644 --- a/http.js +++ b/http.js @@ -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)) } } -- 2.44.0