A Discord bot to display the javadocs of BotCommands, JDA and Java 17
- Searching docs
- By class name (+ identifier)
- By method/field name
- Sending Maven/Gradle/Gradle KTS builds scripts
- Sending Logback configurations
- Getting the latest versions on Jitpack
- Formatting code
- Tags
- Reactions on classes recognized in messages
Contributions are welcome, here are the prerequisites in order to run the bot, so you can test your stuff.
- Java 17
- A PostgreSQL database, a recent enough version (11+) should be enough.
- Have a
Doxxy
folder in aBots
folder, in your user directory, this is where the bot will put its files. The correspondingPath
would be:Path(System.getProperty("user.home"), "Bots", "Doxxy")
- Set up the tables with this script and this one.
- Have a valid
Test_Config.json
in the project root, to which you can find a template here. - When running the bot, add this to the VM options:
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
- ???
- Profit
If you change something to the database, please write a migration script in the sql folder.
- You must first bump the version of the bot in the
pom.xml
, just change the minor version. - You can then copy the
pom.xml
's version intoDatabaseSource.kt
andCreateDatabase.sql
- The name of the migration script must be:
vMajor.Minor__Short_Description.sql
, you can take this template.- For example,
v2.0__Doc_Mentions.sql
- For example,
- Make the modifications to the
CreateDatabase.sql
script as well- This means that, in theory, applying the very first creation script + all the migration scripts should give the same tables.
If the bot says the database is outdated, you can find the migration scripts in the sql folder, only execute the ones that are higher than the current database version.