From 686c36dda473c88b90693277bb454d61b13f45c0 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 2 Dec 2019 19:01:36 +0200 Subject: [PATCH] Add support for TOML config files. Use TOML config files by default. --- .gitignore | 4 + README.md | 48 ++-- config.example.json | 9 - config.example.toml | 7 + package-lock.json | 624 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 6 +- src/config.js | 32 ++- 7 files changed, 688 insertions(+), 42 deletions(-) delete mode 100644 config.example.json create mode 100644 config.example.toml diff --git a/.gitignore b/.gitignore index 4de0866..0e5c12e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,9 @@ /config.json5 /config.json.json /config.json.txt +/config.js +/config.toml +/config.toml.toml +/config.toml.txt /welcome.png /update.sh diff --git a/README.md b/README.md index 889cefe..0ee975f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Inspired by Reddit's modmail system. 1. Install Node.js 10 (LTS) or higher 2. Download the latest release from [the releases page](https://github.com/Dragory/modmailbot/releases) 3. Create a Discord server to be used as the modmail inbox -4. Make a copy of the file `config.example.json` in the same folder and name the copy `config.json`. Open the file and fill in the values. +4. Make a copy of the file `config.example.toml` in the same folder and name the copy `config.toml`. Open the file and fill in the values. - You can also find more configurable options at the end of this page! 5. Install dependencies: `npm ci` 6. Add bot to servers, and make sure to give it proper permissions on the mail server. @@ -40,37 +40,37 @@ See [CHANGELOG.md](CHANGELOG.md) ## Commands ### Anywhere on the inbox server -`!logs ` Lists previous modmail logs with the specified user. If there are a lot of logs, they will be paginated. In this case, you can specify the page number to view as the second argument. -`!block