Friday, September 20, 2024 1:42:18 AM
> settings

Customize


Authenticate

> doggo.js
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
                }]
            });
        }
    }
}
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8