From 888660434bd2b106731c3b3b5cf6f8dd1b4d8bd4 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Fri, 16 Apr 2021 17:35:27 -0500 Subject: [PATCH] Changed database used by cat to a custom, dm4catbot-derived database --- .env.example | 2 -- commands/fun/cat.js | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index e8a6e88..6bdafd4 100644 --- a/.env.example +++ b/.env.example @@ -32,8 +32,6 @@ PREFIX=& # PROCESSING_EMOJI= PROCESSING_EMOJI= -# Put Cat API token here -CAT= # Put Mashape/RapidAPI key here MASHAPE= # Put Google API key here diff --git a/commands/fun/cat.js b/commands/fun/cat.js index 4d08777..d5edc34 100644 --- a/commands/fun/cat.js +++ b/commands/fun/cat.js @@ -4,17 +4,12 @@ const Command = require("../../classes/command.js"); class CatCommand extends Command { async run() { this.message.channel.sendTyping(); - const data = await fetch("https://api.thecatapi.com/v1/images/search?format=json", { - headers: { - "x-api-key": process.env.CAT - } - }); - const json = await data.json(); + const data = await fetch("https://projectlounge.pw/cta/", { redirect: "manual" }); return { embed: { color: 16711680, image: { - url: json[0].url + url: data.headers.get("location") } } };