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

     1  <img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
     2  
     3  ## DiscordGo Modals Example
     4  
     5  This example demonstrates how to utilize DiscordGo to send and process text
     6  inputs in modals. If you have not read `slash_commands` and `components`
     7  examples yet it is recommended to do so before proceeding. As this example
     8  is built using interactions and Slash Commands.
     9  
    10  **Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
    11  Discord chat channel for support.**
    12  
    13  ### Build
    14  
    15  This assumes you already have a working Go environment setup and that
    16  DiscordGo is correctly installed on your system.
    17  
    18  From within the modals example folder, run the below command to compile the
    19  example.
    20  
    21  ```sh
    22  go build
    23  ```
    24  
    25  ### Usage
    26  
    27  ```
    28  Usage of modals:
    29    -app string
    30      	Application ID
    31    -cleanup
    32      	Cleanup of commands (default true)
    33    -guild string
    34      	Test guild ID
    35    -results string
    36      	Channel where send survey results to
    37    -token string
    38      	Bot access token
    39  ```
    40  
    41  The below example shows how to start the bot from the modals example folder.
    42  
    43  ```sh
    44  ./modals -app YOUR_APPLICATION_ID -guild YOUR_TESTING_GUILD -results YOUR_TESTING_CHANNEL -token YOUR_BOT_TOKEN
    45  ```