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

     1  <img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
     2  
     3  ## DiscordGo Context Menu Commands Example
     4  
     5  This example demonstrates how to utilize DiscordGo to create and use context
     6  menu commands. This example heavily relies on `slash_commands` example in
     7  command handling and registration, therefore it is recommended to be read
     8  before proceeding.
     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 context_menus 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 context_menus:
    29    -app string
    30      	Application ID
    31    -cleanup
    32      	Cleanup of commands (default true)
    33    -guild string
    34      	Test guild ID
    35    -token string
    36      	Bot access token
    37  ```
    38  
    39  The below example shows how to start the bot from the context_menus example folder.
    40  
    41  ```sh
    42  ./context_menus -app YOUR_APPLICATION_ID -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN
    43  ```