bothy-sdk
    Preparing search index...

    Function button

    • Builds a button.

      Parameters

      • customId: string

        ID of the component in its message, at most component.custom_id_max_chars characters.

      • label: string

        Display text.

      • value: string

        Value the interaction reports.

      • options: ButtonOptions = {}

        Style, icon and the shared members of ComponentOptions.

      Returns {}

      The generated ComponentCreate.

      RangeError when a value breaks a rule of component.v1; the message names the field.

      button("refund", "Refund", "yes", { style: "danger" }).definition;
      // { label: "Refund", style: "danger", value: "yes" }