A discord bot for Wynncraft utility commands, written in Java using JDA.
See usage (old v1 info): https://forums.wynncraft.com/threads/223425/
Some useful shortcuts for development are written in Makefile.
make buildto (re-)build the image and launch the bot.make upto launch the bot (does not rebuild the image).make downto stop the bot and DB.
For debugging:
make db-upto launch only the DB container.make dbto connect to DB (password:password).mvn testto run tests. DB container needs to be launched.
You can either manually build and install the bot, or pull image from the release. Using docker might be easier but overheads could be a problem in small servers.
Manual build and installation (does not use docker)
- Clone this repository.
- Install correct version of MariaDB (see
docker-compose.yamlat root). - Execute sql files in
mysql/initdirectory. - Set these environment variables for the bot.
PORT... Server port. Exposes Prometheus metrics on/metrics.DISCORD_ACCESS_TOKEN... Discord bot account access tokenBOT_DISCORD_ID... Discord user ID of the botBOT_LOG_CHANNEL_0~BOT_LOG_CHANNEL_4... Discord channel IDs to which bot sends logsPLAYER_TRACKER_CHANNEL... Discord channel ID to which bot sends player number logs once a dayBOT_RESTART_CHANNEL... Discord channel ID to which bot sends a log on every restartMYSQL_HOST... MariaDB host nameMYSQL_PORT... MariaDB portMYSQL_DATABASE... MariaDB database nameMYSQL_USER... MariaDB usernameMYSQL_PASSWORD... MariaDB password for the given username
- Install maven (see
Dockerfileat root for version). - Build, and launch the bot.
mvn clean package -D skipTests
./target/bin/main- Clone this repository, or copy the root
docker-compose.yamlandmysql/initdirectory since only these files are required. - Create a file named
.envand set environment variables (see.env-sample). - Execute
docker-compose up -d.