aboutsummaryrefslogtreecommitdiff
path: root/src/commands/got.js
diff options
context:
space:
mode:
authorIndrajith K L2021-06-19 18:30:58 +0530
committerIndrajith K L2021-06-19 18:30:58 +0530
commit0ef3c83f4049227c08731e3f31e53c38e1da5957 (patch)
tree349b423111db5a8730864b8c555bb15564622377 /src/commands/got.js
parentcaebd6b3e5315d3002107464b33ae7b6bf006800 (diff)
downloadradio-bot-0ef3c83f4049227c08731e3f31e53c38e1da5957.tar.gz
radio-bot-0ef3c83f4049227c08731e3f31e53c38e1da5957.tar.bz2
radio-bot-0ef3c83f4049227c08731e3f31e53c38e1da5957.zip
* Radio Bot Implementation
Diffstat (limited to 'src/commands/got.js')
-rw-r--r--src/commands/got.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/commands/got.js b/src/commands/got.js
deleted file mode 100644
index bfb9295..0000000
--- a/src/commands/got.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const axios = require('axios').default;
-const { MessageEmbed } = require('discord.js');
-const instance = axios.create({
- baseURL: 'https://game-of-thrones-quotes.herokuapp.com/v1'
-});
-
-async function getRandomQuotes(message, args) {
- const randomQuotesUrl = "/random";
- try {
- const result = await instance.get(randomQuotesUrl);
- const { sentence, character: { name, house: { name: houseName } } } = result.data;
- const randomQuoteMessage = new MessageEmbed()
- .setDescription(sentence)
- .setFooter(`${name}, ${houseName}`);
- message.channel.send(randomQuoteMessage);
- } catch (error) {
- const errorMessage = new MessageEmbed()
- .setTitle("Something went wrong: Error getting quotes from Arya Stark")
- .setColor("RED");
- message.channel.send(errorMessage);
- }
-}
-
-module.exports = {
- execute(client, message, args) {
- getRandomQuotes(message, args);
- }
-} \ No newline at end of file