Class InteractionOptionsWrapper

A wrapper for interaction options.

Hierarchy

  • InteractionOptionsWrapper

Constructors

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 mentionable option value (user, role).

    Type Parameters

    Parameters

    • name: string

      The name of the option.

    • Optional required: false

      If true, an error will be thrown if the option is not present, or if the value cannot be found.

    Returns undefined | T

  • Type Parameters

    Parameters

    • name: string
    • required: true

    Returns T

  • 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

Properties

The raw options from Discord.

The resolved data for this options instance.