diff options
author | Indrajith K L | 2021-06-19 18:30:58 +0530 |
---|---|---|
committer | Indrajith K L | 2021-06-19 18:30:58 +0530 |
commit | 0ef3c83f4049227c08731e3f31e53c38e1da5957 (patch) | |
tree | 349b423111db5a8730864b8c555bb15564622377 /src/commons | |
parent | caebd6b3e5315d3002107464b33ae7b6bf006800 (diff) | |
download | radio-bot-0ef3c83f4049227c08731e3f31e53c38e1da5957.tar.gz radio-bot-0ef3c83f4049227c08731e3f31e53c38e1da5957.tar.bz2 radio-bot-0ef3c83f4049227c08731e3f31e53c38e1da5957.zip |
* Radio Bot Implementation
Diffstat (limited to 'src/commons')
-rw-r--r-- | src/commons/confusion.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/commons/confusion.js b/src/commons/confusion.js deleted file mode 100644 index 7a5d9b8..0000000 --- a/src/commons/confusion.js +++ /dev/null @@ -1,22 +0,0 @@ -const {MessageEmbed} = require('discord.js'); -const fetch = require('node-fetch'); -function generateConfusionGif(message) { - message.channel.startTyping(); - const embed = new MessageEmbed() - .setDescription(`I dont understand what you are saying <@${process.env.KLIAS_TAG}> do you know what this guy is asking?`) - .setColor("RANDOM"); - const randomIndex = Math.floor(Math.random() * 49); - fetch(`https://api.tenor.com/v1/random?key=${process.env.TENOR_TOKEN}&q=I%20dont%20understand&limit=50`) - .then(res => res.json()) - .then(response => { - embed.setImage(response.results[randomIndex].media[0].gif.url); - message.channel.stopTyping(); - message.channel.send(embed); - }); -} - -module.exports = { - execute(message) { - generateConfusionGif(message); - } -}
\ No newline at end of file |