mrmBot-Matrix/commands/fun/dog.js
2021-04-12 16:54:44 -05:00

23 lines
No EOL
615 B
JavaScript

const fetch = require("node-fetch");
const Command = require("../../classes/command.js");
class DogCommand extends Command {
async run() {
this.message.channel.sendTyping();
const imageData = await fetch("https://dog.ceo/api/breeds/image/random");
const json = await imageData.json();
return {
embed: {
color: 16711680,
image: {
url: json.message
}
}
};
}
static description = "Gets a random dog picture";
static aliases = ["doggos", "doggo", "pupper", "puppers", "dogs", "puppy", "puppies", "pups", "pup"];
}
module.exports = DogCommand;