Changed database used by cat to a custom, dm4catbot-derived database

This commit is contained in:
TheEssem 2021-04-16 17:35:27 -05:00
parent 7670cce279
commit 888660434b
2 changed files with 2 additions and 9 deletions

View file

@ -32,8 +32,6 @@ PREFIX=&
# PROCESSING_EMOJI=<a:processing:818243325891051581>
PROCESSING_EMOJI=
# Put Cat API token here
CAT=
# Put Mashape/RapidAPI key here
MASHAPE=
# Put Google API key here

View file

@ -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")
}
}
};