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}` ); } }