Discord.https - v3.0.16
    Preparing search index...

    Class SlashCommandIntegerOption

    A slash command integer option.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    autocomplete?: boolean

    Whether this option utilizes autocomplete.

    The choices of this option.

    description: string

    The description of this command.

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

    The description localizations of this command.

    max_value?: number

    The maximum value of this option.

    min_value?: number

    The minimum value of this option.

    name: string

    The name of this command.

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

    The name localizations of this command.

    required: boolean

    Whether this option is required.

    false

    type: Integer

    The type of this option.

    Methods

    • Whether this option uses autocomplete.

      Parameters

      • autocomplete: boolean

        Whether this option should use autocomplete

      Returns this

    • Sets the description of this command.

      Parameters

      • description: string

        The description to use

      Returns this

    • Sets a description localization for this command.

      Parameters

      • locale:
            | "id"
            | "en-US"
            | "en-GB"
            | "bg"
            | "zh-CN"
            | "zh-TW"
            | "hr"
            | "cs"
            | "da"
            | "nl"
            | "fi"
            | "fr"
            | "de"
            | "el"
            | "hi"
            | "hu"
            | "it"
            | "ja"
            | "ko"
            | "lt"
            | "no"
            | "pl"
            | "pt-BR"
            | "ro"
            | "ru"
            | "es-ES"
            | "es-419"
            | "sv-SE"
            | "th"
            | "tr"
            | "uk"
            | "vi"

        The locale to set

      • localizedDescription: null | string

        The localized description for the given locale

      Returns this

    • Sets the description localizations for this command.

      Parameters

      • localizedDescriptions: null | Partial<Record<Locale, null | string>>

        The object of localized descriptions to set

      Returns this

    • Sets the name of this command.

      Parameters

      • name: string

        The name to use

      Returns this

    • Sets a name localization for this command.

      Parameters

      • locale:
            | "id"
            | "en-US"
            | "en-GB"
            | "bg"
            | "zh-CN"
            | "zh-TW"
            | "hr"
            | "cs"
            | "da"
            | "nl"
            | "fi"
            | "fr"
            | "de"
            | "el"
            | "hi"
            | "hu"
            | "it"
            | "ja"
            | "ko"
            | "lt"
            | "no"
            | "pl"
            | "pt-BR"
            | "ro"
            | "ru"
            | "es-ES"
            | "es-419"
            | "sv-SE"
            | "th"
            | "tr"
            | "uk"
            | "vi"

        The locale to set

      • localizedName: null | string

        The localized name for the given locale

      Returns this

    • Sets the name localizations for this command.

      Parameters

      • localizedNames: null | Partial<Record<Locale, null | string>>

        The object of localized names to set

      Returns this

    • Sets whether this option is required.

      Parameters

      • required: boolean

        Whether this option should be required

      Returns this