From 7b3a07ad449f99b69a4716d49f2199da76d1dca7 Mon Sep 17 00:00:00 2001 From: SocketSomeone Date: Sun, 5 Jun 2022 06:25:53 +0200 Subject: [PATCH] fix: add check for subcommands --- src/slash-commands/slash-command.discovery.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slash-commands/slash-command.discovery.ts b/src/slash-commands/slash-command.discovery.ts index 72021d69..69d28f48 100644 --- a/src/slash-commands/slash-command.discovery.ts +++ b/src/slash-commands/slash-command.discovery.ts @@ -103,6 +103,10 @@ export class SlashCommandGroupDiscovery extends CommandDiscovery { return this.reflector.get(MEMBER_PERMISSIONS_METADATA, this.getClass()); } + public isSlashCommand(): this is SlashCommandDiscovery { + return true; + } + public override toJSON(): Record { return { ...this.meta, @@ -117,6 +121,10 @@ export interface SlashCommandSubGroupDiscovery @mix(MethodDiscoveryMixin) export class SlashCommandSubGroupDiscovery extends BaseDiscovery { + public isSlashCommand(): this is SlashCommandDiscovery { + return true; + } + public override toJSON(): Record { return this.meta; }