Fixed help not working with page generator disabled

This commit is contained in:
Essem 2021-08-19 16:49:58 -05:00
parent cb895900d5
commit 7009ff339f
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
2 changed files with 2 additions and 1 deletions

View File

@ -53,6 +53,7 @@ class HelpCommand extends Command {
} else {
if (this.message.channel.guild && !this.message.channel.permissionsOf(this.client.user.id).has("embedLinks")) return "I don't have the `Embed Links` permission!";
const pages = [];
if (help.categories === help.categoryTemplate) await help.generateList();
for (const category of Object.keys(help.categories)) {
const splitPages = help.categories[category].map((item, index) => {
return index % 15 === 0 ? help.categories[category].slice(index, index + 15) : null;

View File

@ -1,7 +1,7 @@
import { commands, info } from "./collections.js";
import { promises } from "fs";
const categoryTemplate = {
export const categoryTemplate = {
general: [],
tags: ["> **Every command in this category is a subcommand of the tag command.**\n"],
"image-editing": ["> **These commands support the PNG, JPEG, WEBP (static), and GIF (animated or static) formats.**\n"]