diff --git a/assets/pages/help.pug b/assets/pages/help.pug
index d3f137a..e8129cf 100644
--- a/assets/pages/help.pug
+++ b/assets/pages/help.pug
@@ -44,7 +44,10 @@ body
code &
| .
blockquote
- p Tip: Use Ctrl+F to find the command you want!
+ p
+ | Tip: You can get more info about a command by using
+ code help [command]
+ | .
h2#table-of-contents Table of Contents
ul
li
@@ -74,6 +77,8 @@ body
ul
li!= command
h2(id='tags') 🏷️ Tags
+ blockquote
+ p Every command in this category is a subcommand of the tag command.
each command in commands.tags
ul
li!= command
diff --git a/commands/help.js b/commands/help.js
index 52e3cd7..a972cdc 100644
--- a/commands/help.js
+++ b/commands/help.js
@@ -50,7 +50,10 @@ exports.run = async (message, args) => {
} else if (category === 2) {
categories.moderation.push(`**${command}**${params ? ` ${params}` : ""} - ${description}`);
} else if (category === 3) {
- categories.tags.push(`**${command}**${params ? ` ${params}` : ""} - ${description}`);
+ const subCommands = Array.from(Object.keys(description));
+ for (const subCommand of subCommands) {
+ categories.tags.push(`**tags${subCommand !== "default" ? ` ${subCommand}` : ""}**${params[subCommand] ? ` ${params[subCommand]}` : ""} - ${description[subCommand]}`);
+ }
} else if (category === 4) {
categories.fun.push(`**${command}**${params ? ` ${params}` : ""} - ${description}`);
} else if (category === 5) {
diff --git a/commands/homebrew.js b/commands/homebrew.js
index 761483c..4bcdae7 100644
--- a/commands/homebrew.js
+++ b/commands/homebrew.js
@@ -18,4 +18,5 @@ exports.run = async (message, args) => {
exports.aliases = ["hbc", "brew", "wiibrew"];
exports.category = 4;
-exports.help = "Creates a Homebrew Channel edit";
\ No newline at end of file
+exports.help = "Creates a Homebrew Channel edit";
+exports.params = "[text]";
\ No newline at end of file
diff --git a/commands/tags.js b/commands/tags.js
index 463cf46..b27d6c1 100644
--- a/commands/tags.js
+++ b/commands/tags.js
@@ -83,7 +83,20 @@ const setTag = async (content, name, message, guild) => {
exports.aliases = ["t", "tag", "ta"];
exports.category = 3;
-exports.help = "placeholder";
+exports.help = {
+ default: "Gets a tag",
+ add: "Adds a tag",
+ delete: "Deletes a tag",
+ edit: "Edits a tag",
+ list: "Lists all tags in the server",
+ random: "Gets a random tag"
+};
+exports.params = {
+ default: "[name]",
+ add: "[name] [content]",
+ delete: "[name]",
+ edit: "[name] [content]"
+};
/*{
default: "Gets a tag",
diff --git a/utils/help.js b/utils/help.js
index 48157e9..3effebb 100644
--- a/utils/help.js
+++ b/utils/help.js
@@ -1,5 +1,6 @@
const pug = require("pug");
const collections = require("./collections.js");
+const logger = require("./logger.js");
const fs = require("fs");
module.exports = async (output) => {
@@ -21,7 +22,10 @@ module.exports = async (output) => {
} else if (category === 2) {
categories.moderation.push(`${command}${params ? ` ${params}` : ""} - ${description}`);
} else if (category === 3) {
- categories.tags.push(`${command}${params ? ` ${params}` : ""} - ${description}`);
+ const subCommands = Array.from(Object.keys(description));
+ for (const subCommand of subCommands) {
+ categories.tags.push(`tags${subCommand !== "default" ? ` ${subCommand}` : ""}${params[subCommand] ? ` ${params[subCommand]}` : ""} - ${description[subCommand]}`);
+ }
} else if (category === 4) {
categories.fun.push(`${command}${params ? ` ${params}` : ""} - ${description}`);
} else if (category === 5) {
@@ -31,6 +35,6 @@ module.exports = async (output) => {
}
}
fs.writeFile(output, pug.renderFile("./assets/pages/help.pug", { commands: categories }), () => {
- console.log("The docs have been generated.");
+ logger.log("The help docs have been generated.");
});
};
\ No newline at end of file