bothy-sdk
    Preparing search index...

    Function questionCard

    • Builds a choice question of 09 11.6.

      The run waits for the answer; whichever comes first, a use of the card or a follow-up, counts, so every component is single use. With buttons, answer i gets the custom ID <customId>.<i> and its value; with asSelect one select of exactly one choice.

      Parameters

      • customId: string

        ID of the select, or the prefix of the button IDs.

      • answers: readonly SelectOption[]

        At least one answer with distinct values.

      • options: QuestionCardOptions = {}

        asSelect, the placeholder, who may answer and the settings.

      Returns {}[]

      The components of the card.

      RangeError for no answers, a broken rule of component.v1 or more components than component.max_per_message.

      questionCard("when", [{ label: "Friday", value: "fri" }, { label: "Monday", value: "mon" }]);