A simple Discord bot written in Go that responds to the !ping command with Pong!.
- Responds to
!pingcommand - Built using the
discordgoGo library - Easy to configure with a JSON config file
- Go installed (version 1.18 or higher)
- A Discord bot token from the Discord Developer Portal
-
Clone the repository:
git clone https://github.com/KDhruv3/Ping-Pong.git
cd Ping-Pong
-
Create a
config.jsonfile with your bot token and prefix:{ "Token": "YOUR_DISCORD_BOT_TOKEN", "BotPrefix": "!" }
-
Install dependencies: go mod tidy
Run the bot with:
go run main.go
Type !ping in your Discord server where the bot is added, and it will reply with Pong!.