PatrolBot is a Discord bot that generates reports regarding a MediaWiki site's patrol logs.
It was initially built for Zelda Wiki but is designed to be usable by any wiki in any language.
| Command | Description |
|---|---|
/report <type> |
Generate a report using data from one or more MediaWiki Action API queries. |
To install and run PatrolBot locally:
-
Install PatrolBot:
go install github.com/iocalebs/patrolbot@latest- Initialize PatrolBot templates and configuration:
patrolbot init- Generate a report:
patrolbot report expiringRun patrolbot --help for more information on available CLI commands.
The bot server uses the config.yaml and templates in the project root to determine what report types are available, how they're worded, and what API queries they use.
When running PatrolBot locally, you can customize reports by editing the config.yaml file and/or templates in $HOME/.patrolbot created by patrolbot init.
- See
Configtype documentation details on supported configuration properties - See
ReportDatatype documentation for details on the data available in report templates. - See
text/templatefor general information on the Go template syntax used for PatrolBot reports.
A JSON Schema is available for validation and editor autocompletion of config.yaml.
