From a8d82bcb14779a4ca00ce4f321fbd4e412431c81 Mon Sep 17 00:00:00 2001 From: Sid Date: Wed, 19 Apr 2023 21:13:22 +0200 Subject: [PATCH] feat: added !meme command --- sidBot-js/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sidBot-js/index.js b/sidBot-js/index.js index 4791a9a..b357980 100644 --- a/sidBot-js/index.js +++ b/sidBot-js/index.js @@ -44,7 +44,8 @@ client.on("messageCreate", (message) => { '!kanye\n- Bot gives user a legendary Kanye quote \n\n' + '!chuck norris\n- Bot gives user a good old Chuck Norris joke \n\n' + '!btc\n- Bot shows user current Bitcoin price in euro \n\n' + - '!eth\n- Bot shows user current Ethereum price in euro \n\n'; + '!eth\n- Bot shows user current Ethereum price in euro \n\n' + + '!meme\n- Bot summons a random meme from reddit'; const embedVar = new EmbedBuilder() .setColor(0x7B64FF) .setTitle('List of sidBots features/commands:') @@ -168,6 +169,16 @@ client.on("messageCreate", async (melding) => { }) } + // meme + if (melding.content === '!meme') { + let resp = await axios.get('https://meme-api.com/gimme'); + const img = resp.data.preview[3]; + + melding.reply({ + content: img, + }) + } + })