Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.95 KB

README.md

File metadata and controls

56 lines (37 loc) · 1.95 KB

ChatGPT Discord Bot

This is an open-source project for building a bot for Discord using the Quarkus, the Supersonic Subatomic Java Framework.

Getting Started

  1. 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.
  1. Obtain an OpenAI API key:
  1. Save the API keys in the ./config/application.properties file:
openai.apiKey=OPENAI_API_KEY
discord.apiKey=DISCORD_API_KEY

Running the application in dev mode

You can run your application in dev mode that enables live coding using:

./mvnw compile quarkus:dev

Packaging and running the application

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.

Contributing

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.

License

This project is licensed under the MIT License. See the LICENSE file for details.