Fixed help not working with page generator disabled
This commit is contained in:
		
							parent
							
								
									cb895900d5
								
							
						
					
					
						commit
						7009ff339f
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -53,6 +53,7 @@ class HelpCommand extends Command {
 | 
				
			||||||
    } else {
 | 
					    } 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!";
 | 
					      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 = [];
 | 
					      const pages = [];
 | 
				
			||||||
 | 
					      if (help.categories === help.categoryTemplate) await help.generateList();
 | 
				
			||||||
      for (const category of Object.keys(help.categories)) {
 | 
					      for (const category of Object.keys(help.categories)) {
 | 
				
			||||||
        const splitPages = help.categories[category].map((item, index) => {
 | 
					        const splitPages = help.categories[category].map((item, index) => {
 | 
				
			||||||
          return index % 15 === 0 ? help.categories[category].slice(index, index + 15) : null;
 | 
					          return index % 15 === 0 ? help.categories[category].slice(index, index + 15) : null;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
import { commands, info } from "./collections.js";
 | 
					import { commands, info } from "./collections.js";
 | 
				
			||||||
import { promises } from "fs";
 | 
					import { promises } from "fs";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const categoryTemplate = {
 | 
					export const categoryTemplate = {
 | 
				
			||||||
  general: [],
 | 
					  general: [],
 | 
				
			||||||
  tags: ["> **Every command in this category is a subcommand of the tag command.**\n"],
 | 
					  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"]
 | 
					  "image-editing": ["> **These commands support the PNG, JPEG, WEBP (static), and GIF (animated or static) formats.**\n"]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue