Skip to content

iocalebs/patrolbot

Repository files navigation

PatrolBot

codecov

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.

Screenshot of a PatrolBot report posted in a Discord channel

Discord Commands

Command Description
/report <type> Generate a report using data from one or more MediaWiki Action API queries.

PatrolBot CLI

To install and run PatrolBot locally:

  1. Install Go

  2. Install PatrolBot:

go install github.com/iocalebs/patrolbot@latest
  1. Initialize PatrolBot templates and configuration:
patrolbot init
  1. Generate a report:
patrolbot report expiring

Run patrolbot --help for more information on available CLI commands.

Configuration

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 Config type documentation details on supported configuration properties
  • See ReportData type documentation for details on the data available in report templates.
  • See text/template for general information on the Go template syntax used for PatrolBot reports.

A JSON Schema is available for validation and editor autocompletion of config.yaml.

About

Discord bot for MediaWiki patrollers

Resources

License

Stars

Watchers

Forks

Packages

No packages published