gluon
    Preparing search index...

    Class Command

    Structure for a command.

    Index

    Constructors

    Properties

    contexts: [0] = ...
    default_member_permissions?: string
    defaultLocale: Locale = Locale.EnglishUS
    description?: string
    description_localizations?: CommandDescriptionLocalizations
    name?: string
    name_localizations?: CommandNameLocalizations
    nsfw: boolean = false
    options: CommandOptionBuilder[] = []
    type: ApplicationCommandType = ApplicationCommandType.ChatInput

    Methods

    • Returns the correct Discord format for a command.

      Parameters

      • Optionalformat: JsonTypes
      • __namedParameters: { suppressValidation: boolean } = ...

      Returns {
          default_member_permissions: undefined | string;
          description: undefined | string;
          description_localizations: undefined | CommandDescriptionLocalizations;
          name: undefined | string;
          name_localizations: undefined | CommandNameLocalizations;
          nsfw: boolean;
          options: (
              | CommandOptionStorageJSON
              | CommandOptionCacheJSON
              | CommandOptionDiscordJSON
          )[];
          type: ApplicationCommandType;
      }