mrmBot-Matrix/commands/fun/dog.js

23 lines
627 B
JavaScript
Raw Normal View History

import fetch from "node-fetch";
import Command from "../../classes/command.js";
class DogCommand extends Command {
async run() {
this.client.sendChannelTyping(this.message.channel.id);
const imageData = await fetch("https://dog.ceo/api/breeds/image/random");
const json = await imageData.json();
return {
2021-11-10 04:09:10 +00:00
embeds: [{
color: 16711680,
image: {
url: json.message
}
2021-11-10 04:09:10 +00:00
}]
};
}
static description = "Gets a random dog picture";
static aliases = ["doggos", "doggo", "pupper", "puppers", "dogs", "puppy", "puppies", "pups", "pup"];
}
export default DogCommand;