nyx Typedoc
    Preparing search index...

    Interface ParentCommand<Types>

    A top level command that serves only to contain * subcommands or subcommand groups. ParentCommands cannot be executed by themselves, a subcommand must be specified.

    interface ParentCommand<Types extends InteractionTypes = InteractionTypes> {
        size: number;
        addChildren(
            ...children: (SubCommand<Types> | SubCommandGroup<Types>)[],
        ): this;
        findChildByClass<
            SearchedChild extends
                ClassImplements<SubCommand<Types> | SubCommandGroup<Types>>,
        >(
            child: SearchedChild,
        ): InstanceType<SearchedChild> | null;
        findChildByName(
            name: string,
        ): SubCommand<Types> | SubCommandGroup<Types> | null;
        getChildren(): ReadonlyCollection<
            string,
            SubCommand<Types>
            | SubCommandGroup<Types>,
        >;
        getData(): RESTPostAPIChatInputApplicationCommandsJSONBody;
        getGuilds(): readonly string[] | null;
        getId(): string;
        getMaxChildren(): number;
        getMeta(): Readonly<Metadata> | null;
        isContextMenu(): this is ContextMenuCommand<Types>;
        isParent(): this is ParentCommand<Types>;
        isStandalone(): this is StandaloneCommand<Types>;
        isSubCommand(): this is SubCommand<Types>;
        isSubCommandGroup(): this is SubCommandGroup<Types>;
        removeChildByInstance(
            child: SubCommand<Types> | SubCommandGroup<Types>,
        ): this;
        removeChildByName(child: string): this;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index
    size: number

    The number of children this command has.