Interface UtilityOption

interface UtilityOption {
    description: string;
    description_localizations?: Partial<Record<Locale, null | string>>;
    name: string;
    name_localizations?: Partial<Record<Locale, null | string>>;
    required?: boolean;
    type: "boolean" | "user" | "mentionable" | "attachment" | "role";
}

Hierarchy (View Summary)

Properties

description: string

The description of the option. This should be a string that describes what the option does.

description_localizations?: Partial<Record<Locale, null | string>>

The localizations for the command description. This should be an object where the keys are locale codes and the values are the localized descriptions.

{ "en-US": "This is my command" }
name: string

The name of the command, subcommand, subcommand group, option. This should be a lowercase string with no spaces. It can only contain alphanumeric characters, underscores, and dashes.

name_localizations?: Partial<Record<Locale, null | string>>

The localizations for the command name. This should be an object where the keys are locale codes and the values are the localized names.

{ "en-US": "My Command" }
required?: boolean

Whether the option is required. If true, the user must provide a value for this option. If false, the user can skip this option.

type: "boolean" | "user" | "mentionable" | "attachment" | "role"

The type of the option. This should be one of the following:

  • "boolean": A boolean option
  • "user": A user option
  • "mentionable": A mentionable option (user or role)
  • "attachment": An attachment option
  • "role": A role option