enwnbot2

Converts MediaWiki [[links]] and {{templates}} to links, informs important events from wiki, handles announces review queue, and under review, and handles when they last saw a given user.
git clone http://git.hanabi.in/repos/enwnbot2.git
Log | Files | Refs | README | LICENSE

commit c1e48d30088c65243e309c973404cc8c0b49a1c4
parent 814e6e91f13ae7674dc3308d79326be2694f1e4b
Author: Sana <36829952+cognitive137@users.noreply.github.com>
Date:   Thu,  1 Oct 2020 01:16:38 +0530

Create README.md
Diffstat:
AREADME.md | 42++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,42 @@ +Converts MediaWiki [[links]] and {{templates}} to links. + +# Installation + +To run this project, run the following commands after cloning it. + +```sh +cd <DIR> +yarn # or `npm i` +yarn start # or `npm run start` +``` + +# Configuration + +Use the `config.js` to configure the bot. + +- Specify the bot's IRC nick in `botName`. (eg. `linkBot`) +- Mention the list of channels to monitor in `channels`. +- Specify IRC channel in `server`. (eg. `irc.freenode.net`) +- API should be specified in `URL`. (eg. `https://en.wikinews.org/w/index.php?title=`) + +Additionally, the bot reports any errors to its maintainers. + +- Mention the list of maintainers in the `maintainers` array. +- PM to the bot will not be forwarded to anyone, unless it starts with a particular string mentioned in `report`. If the bot gets a PM which starts with `report`, it will forward the PM to a list of admins. **Note:** This could be abused, so specifying `report` as `/` might be a good idea. +- Specify the list of admins who would like to receive PM of the forwarded message in `admins`. + +Sample `config.js` looks like: + +```js +const config = { + admins: ['jdoe', 'samsmith'], + botName: 'linkBot', + channels: ['#foo', '##bar'], + maintainers: ['list', 'of', 'maintainers'], + report: '!ADMIN', + server: 'irc.freenode.net', + URL: 'https://en.wikinews.org/w/index.php?title=', +}; +``` + +**Note:** In case if your message contains templates and you don't want the bot to announce the link -- add `--nl` at the end of the message.