const ESMCommand = require("../esm_command"); module.exports = class ESMCommand_Doggo extends ESMCommand { constructor(bot) { super(bot); this.information = { params: "", category: "fun", help: "Humanity's best friend" }; this.configuration = { allowedInTextChannels: { modifiable: true, default: true }, cooldown: { modifiable: false, default: [5, "seconds"] } }; } async fromDiscord() { let ret = await this.ESMBot.request.get("https://dog.ceo/api/breeds/image/random"); if (ret.ok) { let response = JSON.parse(ret.text); if (response.status !== "success") return; this.ESMBot.send(this.message.channel, { files: [{ attachment: response.message }] }); } } }