Class Button

Hierarchy

Constructors

  • Create a new Button.

    Parameters

    • style: ButtonStyles | ButtonColors

      The style of this button.

    • urlOrCustomID: string

      The url of this button if style 5, else the custom ID of this button.

    Returns Button

Properties

customID?: string
disabled: boolean
emoji?: PartialEmoji
label?: string
load: any

this method is meant to be for internal use only, don't use it, as it may break or change at a moments notice

type: BUTTON
url?: string

Methods

  • Disable this component.

    Returns Button

  • Enable this component.

    Returns Button

  • Set the custom id of this button (styles 1-4).

    Parameters

    • customID: string

      A developer-defined identifier for the button, max 100 characters.

    Returns Button

  • Set the emoji of this button.

    Parameters

    Returns Button

  • Set the label of this button

    Parameters

    • label: string

      The label to display on this button.

    Returns Button

  • Set the style of this button.

    • 1 - blurple
    • 2 - grey
    • 3 - green
    • 4 - red
    • 5 - link

    Parameters

    Returns Button

  • Set the custom id of this button (style 5).

    Parameters

    • url: string

      The url to open when this button is clicked.

    Returns Button

Generated using TypeDoc