A super simple discord bot template made using JDA and the Gradle build tool.
The code can be found in src/main/java/org/botexample
.
Nothing more than a discord bot token.
- Clone the repository from Github.
git clone https://github.com/lucasstarsz/Java-Discord-Bot-Template.git
- Enter the project's directory.
cd Java-Discord-Bot-Template/
- Build the project.
./gradlew clean build
- Run the project, using your discord bot token.
./gradlew run --args "your discord bot token here"
Having issues using gradlew
? Read this.
This template does the following:
- Displays a "ready for takeoff" message on the
ready
event. - Prints out a chatter's message every time they speak in a channel visible to the bot.
- Prints out a chatter's message every time they Direct Message (DM) the bot.
For more information on how to use JDA, check out their github repository.