Skip to content

Commit

Permalink
fix(HelpCommand): fix crash on commands without subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
Amgelo563 committed Apr 29, 2022
1 parent d1a4abd commit 3fcef60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/examplecategory/HelpCommand.ts
Expand Up @@ -65,7 +65,7 @@ export default class HelpCommand extends Command {
if (FoundCommand) {
const subCommandName = this.options.getString('subcommand');

if (!subCommandName && !(FoundCommand instanceof SubcommandableCommand)) return this.reply(await FoundCommand.getUsage(this.prefix));
if (!subCommandName || !(FoundCommand instanceof SubcommandableCommand)) return this.reply(await FoundCommand.getUsage(this.prefix));

// FIXME The type is somehow wrong here, CommandClass appears as AbstractCommand, when it's actually a subclass of it.
// @ts-ignore See above
Expand Down

0 comments on commit 3fcef60

Please sign in to comment.