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=<a:processing:818243325891051581>
PROCESSING_EMOJI= PROCESSING_EMOJI=
# Put Cat API token here
CAT=
# Put Mashape/RapidAPI key here # Put Mashape/RapidAPI key here
MASHAPE= MASHAPE=
# Put Google API key here # Put Google API key here

View file

@ -4,17 +4,12 @@ const Command = require("../../classes/command.js");
class CatCommand extends Command { class CatCommand extends Command {
async run() { async run() {
this.message.channel.sendTyping(); this.message.channel.sendTyping();
const data = await fetch("https://api.thecatapi.com/v1/images/search?format=json", { const data = await fetch("https://projectlounge.pw/cta/", { redirect: "manual" });
headers: {
"x-api-key": process.env.CAT
}
});
const json = await data.json();
return { return {
embed: { embed: {
color: 16711680, color: 16711680,
image: { image: {
url: json[0].url url: data.headers.get("location")
} }
} }
}; };