github.com/meowstercatel/discordgo@v0.0.0-20250615204139-29b43d676735/examples/components/README.md (about)

     1  <img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
     2  
     3  ## DiscordGo Components Example
     4  
     5  This example demonstrates how to utilize DiscordGo to create and use message
     6  components, such as buttons and select menus. For usage of the text input
     7  component and modals, please refer to the `modals` example.
     8  
     9  **Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
    10  Discord chat channel for support.**
    11  
    12  ### Build
    13  
    14  This assumes you already have a working Go environment setup and that
    15  DiscordGo is correctly installed on your system.
    16  
    17  From within the components example folder, run the below command to compile the
    18  example.
    19  
    20  ```sh
    21  go build
    22  ```
    23  
    24  ### Usage
    25  
    26  ```
    27  Usage of components:
    28    -app string
    29      	Application ID
    30    -guild string
    31      	Test guild ID
    32    -token string
    33      	Bot access token
    34  ```
    35  
    36  The below example shows how to start the bot from the components example folder.
    37  
    38  ```sh
    39  ./components -app YOUR_APPLICATION_ID -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN
    40  ```