docpages/example_programs/interactions_and_components/components/components.md
raw| 1 | \page components Using Button Components |
| 2 | |
| 3 | Discord's newest features support sending buttons alongside messages, which when clicked by the user trigger an interaction which is routed by D++ as an `on_button_click` event. To make use of this, use this code as in this example. |
| 4 | |
| 5 | \include{cpp} components.cpp |
| 6 | |
| 7 | When the feature is functioning, the code below will produce buttons on the reply message like in the image below: |
| 8 | |
| 9 | \image html button.png |