Skip to content

Commit 1851628

Browse files
committed
feat(slash-command-discovery): add getters for subcommands
1 parent 6e2ac3f commit 1851628

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/commands/slash-commands/slash-command.discovery.ts

+8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ export class SlashCommandDiscovery extends CommandDiscovery<SlashCommandMeta> {
4040
return this.subcommands.ensure(command.getName(), () => command);
4141
}
4242

43+
public getSubcommand(name: string) {
44+
return this.subcommands.get(name);
45+
}
46+
47+
public getSubcommands() {
48+
return this.subcommands;
49+
}
50+
4351
public getRawOptions(): Record<string, OptionMeta> {
4452
return this.reflector.get(OPTIONS_METADATA, this.getHandler()) ?? {};
4553
}

0 commit comments

Comments
 (0)