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/commands/bb.js | |
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/commands/bb.js')
-rw-r--r-- | src/commands/bb.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/commands/bb.js b/src/commands/bb.js deleted file mode 100644 index bfd0c3a..0000000 --- a/src/commands/bb.js +++ /dev/null @@ -1,28 +0,0 @@ -const axios = require('axios').default; -const { MessageEmbed } = require('discord.js'); -const instance = axios.create({ - baseURL: 'https://breaking-bad-quotes.herokuapp.com/v1' -}); - -async function getRandomQuotes(message, args) { - const randomQuotesUrl = "/quotes"; - try { - const result = await instance.get(randomQuotesUrl); - const { quote, author } = result.data[0]; - const randomQuoteMessage = new MessageEmbed() - .setDescription(quote) - .setFooter(`${author}`); - message.channel.send(randomQuoteMessage); - } catch (error) { - const errorMessage = new MessageEmbed() - .setTitle("Stay out of territory: Error getting quotes from Walter White") - .setColor("RED"); - message.channel.send(errorMessage); - } -} - -module.exports = { - execute(client, message, args) { - getRandomQuotes(message, args); - } -}
\ No newline at end of file |