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;