"Just another Discord bot, this one sends random quotes :)" sums it up.
It sends a random quote every period you define.
There is also a command to get one as well.
You need to create an application.yaml
file, with the following fields filled:
discord:
bot-token:
webhook:
id:
token:
channel-id:
app-id:
Then place it inside a config
folder.
Run gradle quarkusBuild
, then copy the build/quarkus-app
contents to the desired folder.
In dev, run gradle quarkusDev
.
Otherwise, if it's already built, just run java -jar quarkus-run.jar
.
Note: remember to have config/application.yaml
in the folder you're running.
The bot has 2 possible sources it gets the quotes from: goodreads (default) and Pensador.
You can choose which one by specifying the source
in the yaml. (goodreads
or pensador
)
To change how often it runs, specify in the yaml as cron-expr
. (
uses quartz format
by default)
By default is runs every 9, 12, 15, 18, 21 o'clock. 😳
As you may have noticed, this project uses Quarkus.
If you're new to Quarkus, I have written two guides to help you understand its dependency injection and configuration.