A wrapper for interaction options.

Hierarchy

  • InteractionOptionsWrapper

Constructors

Properties

The raw options from Discord.

The resolved data for this options instance.

Methods

  • Get a boolean option value.

    Parameters

    • name: string

      The name of the option.

    • Optional required: false

      If true, an error will be thrown if the option is not present.

    Returns undefined | boolean

  • Parameters

    • name: string
    • required: true

    Returns boolean

  • Get an integer option value.

    Parameters

    • name: string

      The name of the option.

    • Optional required: false

      If true, an error will be thrown if the option is not present.

    Returns undefined | number

  • Parameters

    • name: string
    • required: true

    Returns number

  • Get a number option value.

    Parameters

    • name: string

      The name of the option.

    • Optional required: false

      If true, an error will be thrown if the option is not present.

    Returns undefined | number

  • Parameters

    • name: string
    • required: true

    Returns number

  • Get a string option value.

    Type Parameters

    • T extends string = string

    Parameters

    • name: string

      The name of the option.

    • Optional required: false

      If true, an error will be thrown if the option is not present.

    Returns undefined | T

  • Type Parameters

    • T extends string = string

    Parameters

    • name: string
    • required: true

    Returns T