cleanup
This commit is contained in:
parent
9539ea32cd
commit
513efc4436
6 changed files with 9 additions and 115 deletions
|
@ -4,7 +4,6 @@ import * as collections from "../../utils/collections.js";
|
|||
import { htmlescape } from "../../utils/misc.js";
|
||||
|
||||
class CountCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const counts = await database.getCounts();
|
||||
if (this.args.length !== 0) {
|
||||
|
@ -26,7 +25,8 @@ class CountCommand extends Command {
|
|||
}
|
||||
return "You need to specify a command to see its usage amount!"
|
||||
}
|
||||
|
||||
|
||||
static category = "general"
|
||||
static description = "Gets how many times a command was used";
|
||||
static arguments = ["{mention/id}"];
|
||||
static aliases = ["counts"];
|
||||
|
|
|
@ -18,22 +18,22 @@ class HelpCommand extends Command {
|
|||
return { html: html }
|
||||
}
|
||||
if (help.categories[this.args[0].toLowerCase()]) {
|
||||
html = `<h2>mrmBot Help - ${htmlescape(this.args[0])}</h2><table><tr><th>Command</th><th>Description</th></tr>`
|
||||
html = `<h2>mrmBot Help - ${htmlescape(this.args[0])}</h2><table><tr><th> Command </th><th> Description </th></tr>\n`
|
||||
for (const [command] of collections.commands) {
|
||||
if (collections.info.get(command).category != this.args[0].toLowerCase()) continue;
|
||||
const description = collections.info.get(command).description;
|
||||
html = html + `<tr><td>${command}</td><td>${description}</td></tr>`
|
||||
html = html + `<tr><td> ${command} </td><td> ${description} </td></tr>\n`
|
||||
}
|
||||
html = html + "</table>"
|
||||
html = html + "</table><br><sub>(mobile formatting will be fixed soon)</sub>"
|
||||
return { html: html }
|
||||
}
|
||||
}
|
||||
const prefix = htmlescape(process.env.PREFIX);
|
||||
html = `<h2>mrmBot Help - Categories</h2><table><tr><th>Category</th><th>Command</th></tr>`
|
||||
html = `<h2>mrmBot Help - Categories</h2><table><tr><th> Category </th><th> Command </th></tr>`
|
||||
for (const category of Object.keys(help.categories)) {
|
||||
html = html + `<tr><td>${category}</td><td>${prefix}help ${category}</td></tr>`
|
||||
html = html + `<tr><td> ${category} </td><td> ${prefix}help ${category} </td></tr>`
|
||||
}
|
||||
html = html + "</table>"
|
||||
html = html + "</table><br><sub>(mobile formatting will be fixed soon)</sub>"
|
||||
|
||||
return { html: html }
|
||||
// return { html: "<h1>There are no mrmBot Docs Yet</h1>In the meantime, please refer to https://esmbot.net/help.html" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue