Discord bot that provides fun image editing commands, such as image captioning. View the list of commands with /help
.
- Java 17 SDK or higher: Ensure you have the correct version of Java installed to build and run the bot.
- IntelliJ IDEA: Recommended for project setup and development.
- Discord Bot Token: You need a bot token from the Discord Developer Portal to run Borgar.
- In the IDEA main menu, select
Import Project
(orFile
→Open…
if you already have a project open). - Select the project's
build.gradle.kts
file to import the project. - Go to
File
→Project Structure
→Project Settings
→Project
and setSDK
to a Java 17 or higher SDK. - Optional, but recommended: By default, IntelliJ delegates to Gradle to build the project. This is unnecessary for this project and causes longer build times. To make it use the builtin compiler:
- Open the
Gradle Settings
dialog from the Gradle tab. - Change the
Build and run using
andRun tests using
fields toIntelliJ IDEA
. - Go to
File
→Project Structure
→Project
and setProject compiler output
to$PROJECT_DIR$/out
.
- Open the
- Run
io.github.shaksternano.borgar.core.Main#main
- It should fail to run the first time due to missing arguments such as the Discord bot token, so put those in the
Program arguments
field under theMain
run configuration →Edit Configurations...
. - Add the required program argument:
DISCORD_BOT_TOKEN=your-bot-token
- Run in a terminal from the same directory as the project directory
./gradlew build
on GNU/Linux and Mac, orgradlew build
on Windows. - Alternatively, in IntelliJ IDEA, open the Gradle tab on the right and execute build under
Tasks
→build
. After this is done once, the build task should appear in the run configurations. - The JAR should appear in
${projectDir}/build/libs
, and should be calledborgar-VERSION.jar
. - To execute the jar, run the command
java -jar borgar-{VERSION}.jar DISCORD_BOT_TOKEN={TOKEN}
. For example,java -jar borgar-1.0.0.jar DISCORD_BOT_TOKEN=123456789
.
Some of the fun commands provided by Borgar:
%caption
: Add captions to an image.
%crop
: Crops an image.
%pixelate
: Pixelates an image.
Java version issues: Ensure you're using Java 17 or higher. You can check this with:
java -version
Bot Token Issues: Make sure the bot token is correct and that the bot is invited to your server.
Build failures: If you're experiencing slow build times, try switching IntelliJ to use its internal build system as outlined in the setup instructions.
Contributions to Borgar are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a clear explanation of your changes.
This project is licensed under the MIT License - see the LICENSE file for more details.