github.com/meowstercatel/discordgo@v0.0.0-20250615204139-29b43d676735/examples/pingpong/README.md (about) 1 <img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200"> 2 3 ## DiscordGo Ping Pong Example 4 5 This example demonstrates how to utilize DiscordGo to create a Ping Pong Bot. 6 7 This Bot will respond to "ping" with "Pong!" and "pong" with "Ping!". 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 18 From within the pingpong example folder, run the below command to compile the 19 example. 20 21 ```sh 22 go build 23 ``` 24 25 ### Usage 26 27 This example uses bot tokens for authentication only. While user/password is 28 supported by DiscordGo, it is not recommended for bots. 29 30 ``` 31 ./pingpong --help 32 Usage of ./pingpong: 33 -t string 34 Bot Token 35 ``` 36 37 The below example shows how to start the bot 38 39 ```sh 40 ./pingpong -t YOUR_BOT_TOKEN 41 Bot is now running. Press CTRL-C to exit. 42 ```