Changed database used by cat to a custom, dm4catbot-derived database
This commit is contained in:
parent
7670cce279
commit
888660434b
2 changed files with 2 additions and 9 deletions
|
@ -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
|
||||||
|
|
|
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue