Message responses are coded in the Producer
implementations in the sectery.producers
package
of the producers
module.
To add support for a new message response:
- Write a new
Producer
implementation, e.g.Count
- Write a test for it, e.g.
CountSpec
- Add it to the list of producers in
Producer.producers
For operational convenience, tests use H2. Production uses MySQL, so SQL queries need to be portable between the two.
$ sbt test
To test against a real IRC server, export the necessary env vars and run the test main method:
$ IRC_USER=redacted \
IRC_PASS=redacted \
IRC_HOST=redacted \
IRC_PORT=redacted \
OPEN_WEATHER_MAP_API_KEY=redacted \
AIRNOW_API_KEY=redacted \
FINNHUB_API_TOKEN=redacted \
OPENAI_APIKEY=redacted \
SLACK_BOT_TOKEN=redacted \
SLACK_APP_TOKEN=redacted \
sbt Test/run
This uses Testcontainers to run the necessary RabbitMQ and MariaDB dependencies within local Docker containers.
Sectery uses PircBotX to interface with an IRC server.
Sectery uses ZIO for asynchronicity and structuring effects.