Skip to content
GitHub

CommandBuildResult

type alias in meocord/interface Since 4.0.0

type CommandBuildResult<T extends BuildableCommandType> =
  T extends CommandType.SLASH
    ? | SlashCommandBuilder
      | SlashCommandOptionsOnlyBuilder
      | SlashCommandSubcommandsOnlyBuilder
    : T extends CommandType.CONTEXT_MENU
      ? ContextMenuCommandBuilder
      : T extends CommandType.PRIMARY_ENTRY_POINT
        ? PrimaryEntryPointCommandData
        : never

What a builder's build() returns for its command type.

A SlashCommandBuilder for SLASH, in any of the narrowed forms chaining options or subcommands produces; a ContextMenuCommandBuilder for CONTEXT_MENU; and the raw REST body for PRIMARY_ENTRY_POINT, which discord.js has no builder for.

See also