github.com/meowstercatel/discordgo@v0.0.0-20250615204139-29b43d676735/examples/autocomplete/README.md (about) 1 <img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200"> 2 3 ## DiscordGo Slash Command Autocomplete Option Example 4 5 This example demonstrates how to utilize DiscordGo to create and use 6 autocomplete options in Slash Commands. As this example uses interactions, 7 slash commands and slash command options, it is recommended to read 8 `slash_commands` example 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 autocomplete 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 autocomplete: 29 -guild string 30 Test guild ID. If not passed - bot registers commands globally 31 -rmcmd 32 Whether to remove all commands after shutting down (default true) 33 -token string 34 Bot access token 35 ``` 36 37 The below example shows how to start the bot from the autocomplete example folder. 38 39 ```sh 40 ./autocomplete -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN 41 ```