Saturn
is a Moderator Bot made for Hack.Chat
(https://github.com/hack-chat ) project.
Clone the project and step into the saturn/
directory before proceeding.
git clone https://github.com/ArteomBalanuta/saturn.git
cd saturn
Make sure JDK 23 or above is installed.
java --version
Before proceeding make sure sqlite3
is installed and available in your terminal.
/bin/bash /deploy/create_db.sh
Check database.db
is created in database/
directory.
Adjust config.toml
configuration file in root directory, set the flag:
dbPath = "database/database.db"
Linux:
./mvnw package
Windows:
mvnw.cmd package
After build is complete Jar file saturn.jar
will be generated in target/
directory:
Example:
dbPath = "database/database.db"
Path do database file. Relative/absolute path can be used.
wsUrl = "wss://hack.chat/chat-ws"
Chat's WebSocket address.
cmdPrefix = "*"
Command prefix used to trigger the bot.
channel = "programming"
Channel used by the bot.
nick = "alphaBot"
Bot's nick.
trip = "secret13"
Bot's password is used by the server to generate the trip.
userTrips = ""
List of trips that are granted access to run basic commands.
adminTrips = "g0KY09"
Trip codes that are granted ADMIN role, full access.
autoReconnect = false
Enable/disable reconnect feature.
healthCheckIntervalMs = 300000
Setting the health check interval in milliseconds.
autorunCommands = "/whisper alphaBot *replica lounge, /whisper alphaBot *say hello lads!"
Autorun commands to be executed on bot's startup.
java -Dlog4j.configurationFile=./log4j2.xml -jar target/saturn.jar
Fat/Uber
JAR is generated at: /target/saturn.jar
.
Feel free to move/deploy the application along with next required files:
database.db, config.toml, log4j2.xml