# Button clicked

## Receive the event

Once a user clicked on the button, we want to response too but with a dropdown menu this time

```javascript
client.on("buttonClicked", btn => {
    console.log(btn)

    // Response to the button with a dropdown menu
    btn.reply({
        content: "Last component :)", // the message content
        components: [
            new utils.Dropdown({
                placeholder: "Placeholder", // custom placeholder text if nothing is selected, max 100 characters
                min: 0, // the minimum number of items that must be chosen; default 1, min 0, max 25
                max: 3, // the maximum number of items that can be chosen; default 1, max 25
                options: [
                    new utils.DropdownOption({
                        label: "Label 1", // the user-facing name of the option, max 25 characters
                        value: "Value 1", // the dev-define value of the option, max 100 characters
                        description: "Description" // an additional description of the option, max 50 characters
                    }),
                    new utils.DropdownOption({
                        label: "Label 2",
                        value: "Value 2",
                        description: "Description",
                        default: true
                    }),
                    new utils.DropdownOption({
                        label: "Label 3",
                        value: "Value 3",
                        description: "Description"
                    })
                ],
                ID: "lel" // a developer-defined identifier for the button, max 100 characters
            })
        ]
    })
})
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flamex.gitbook.io/dsc-utils/getting-started/button-clicked.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
