Friday, September 20, 2024 1:44:39 AM
> settings

Customize


Authenticate

> uptime.js
const ESMCommand = require("../esm_command");
module.exports = class ESMCommand_Uptime extends ESMCommand {
    constructor(bot) {
        super(bot);
        this.permissions = {
            requires_server: true
        };

        this.commandParams = {
            serverID: {
                regex: this.util.regex.serverID.base
            }
        };

        this.information = {
            category: "server",
            params: "<server_id>",
            help: "Displays the uptime of a server"
        };

        this.configuration = {
            allowedInTextChannels: {
                modifiable: true,
                default: true
            }
        };
    }

    async fromDiscord() {
        let uptime = await this.db.getServerUptime(this.params.serverID);
        this.ESMBot.send(
            this.message.channel,
            `**${this.params.serverID}'s** current uptime is ${uptime}`
        );
    }
}
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8