Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
David Gomes authored and David Gomes committed Jan 6, 2022
2 parents b5e74e6 + c7c258b commit 02772b6
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
# Building
# Pensador

Run `mvn quarkusBuild`, then copy the `build/quarkus-app` contents to the desired folder.
"Just another Discord bot, this one sends random quotes :)" sums it up.

## Required configuration

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.

## Building

Run `gradle quarkusBuild`, then copy the `build/quarkus-app` contents to the desired folder.

## Running

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.

## Further configuration

### Quotes source

The bot has 2 possible sources it gets the quotes from: [goodreads](https://goodreads.com) (default) and [Pensador](https://www.pensador.com).

You can choose which one by specifying the `source` in the yaml. (`goodreads` or `pensador`)

### Period

To change how often it runs, specify in the yaml as `cron-expr`. (the Quarkus scheduler uses the [quartz format](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) by default)

0 comments on commit 02772b6

Please sign in to comment.