This is an open-source project for building a bot for Discord using the Quarkus, the Supersonic Subatomic Java Framework.
- Obtain a Discord API key by creating a new bot account:
- Go to the Discord Developer Portal and create a new app.
- Select "Bot" from the left-hand menu, click "Add Bot", and follow the instructions to create a bot account for your app.
- Copy your bot token, which will be used as your Discord API key.
- Obtain an OpenAI API key:
- Sign up for a free account on the OpenAI website.
- Create an API key by following the instructions in the OpenAI API documentation.
- Save the API keys in the ./config/application.properties file:
openai.apiKey=OPENAI_API_KEY
discord.apiKey=DISCORD_API_KEY
You can run your application in dev mode that enables live coding using:
./mvnw compile quarkus:dev
The application can be packaged using:
./mvnw package
It produces the quarkus-run.jar
file in the target/quarkus-app/
directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/
directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar
.
If you want to build an über-jar, execute the following command:
./mvnw package -Dquarkus.package.type=uber-jar
The application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar
.
Contributions to this project are welcome. If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.