From 89e7d6373baad0a522187399c9a6704d38dc829b Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 3 Dec 2019 01:51:11 +0200 Subject: [PATCH] Switch from TOML to INI. New documentation. Add start.bat file for Windows. --- .editorconfig | 3 + .gitignore | 10 +- CHANGELOG.md | 7 + README.md | 176 ++-------------------- config.example.ini | 9 ++ config.example.toml | 7 - docs/commands.md | 31 ++++ docs/configuration.md | 315 +++++++++++++++++++++++++++++++++++++++ docs/plugins.md | 47 ++++++ docs/setup.md | 37 +++++ docs/starting-the-bot.md | 16 ++ package-lock.json | 5 - package.json | 2 +- src/config.js | 22 ++- start.bat | 17 +++ 15 files changed, 512 insertions(+), 192 deletions(-) create mode 100644 config.example.ini delete mode 100644 config.example.toml create mode 100644 docs/commands.md create mode 100644 docs/configuration.md create mode 100644 docs/plugins.md create mode 100644 docs/setup.md create mode 100644 docs/starting-the-bot.md create mode 100644 start.bat diff --git a/.editorconfig b/.editorconfig index 0f09989..5d12634 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,6 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index 0e5c12e..6757ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,7 @@ /.vscode /.idea /node_modules -/config.json -/config.json5 -/config.json.json -/config.json.txt -/config.js -/config.toml -/config.toml.toml -/config.toml.txt +/config.* +!/config.example.ini /welcome.png /update.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d761d..e5b4f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## v2.29.0 +* **Change default configuration format to .ini** + * Existing `config.json` files will continue to work and will not be deprecated +* New, rewritten instructions for setting up and using the bot +* Updated several package dependencies +* Fixed incompatibility with certain Node.js 10 versions + ## v2.28.0 * Fix error when saving attachments locally with `attachmentStorage` set to `"local"` (default) when the bot's folder is on a different storage device than the system's temp folder diff --git a/README.md b/README.md index 0ee975f..517f954 100644 --- a/README.md +++ b/README.md @@ -1,171 +1,19 @@ # Modmail for Discord -A bot for [Discord](https://discordapp.com/) that allows users to DM the bot to contact the server's entire mod team. -These DMs get relayed to a modmail server where each user gets their own channel, or "thread". -Moderators and admins can then reply to these threads, and these responses are relayed back to the original user as a DM. +A bot for [Discord](https://discordapp.com/) that allows users to DM the bot to contact the server's moderators/staff +without messaging them individually or pinging them publically on the server. +These DMs get relayed to modmail *threads*, channels where staff members can reply to and talk with the user. +To the user, the entire process happens in DMs with the bot. Inspired by Reddit's modmail system. -## NOTE! If you're upgrading to v2.23.0, note that Node.js 10 is now required at minimum. - -## Table of contents -- [Setup](#setup) -- [Support server](#support-server) -- [Changelog](#changelog) -- [Commands](#commands) - - [Anywhere on the inbox server](#anywhere-on-the-inbox-server) - - [Inside a modmail thread](#inside-a-modmail-thread) -- [Configuration options](#configuration-options) -- [Plugins](#plugins) - - [Specifying plugins to load](#specifying-plugins-to-load) - - [Creating a plugin](#creating-a-plugin) - -## Setup -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.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. -7. Run the bot: `npm start` +## Getting started +* **[🛠️ Setting up the bot](docs/setup.md)** +* [📝 Configuration](docs/configuration.md) +* [🤖 Commands](docs/commands.md) +* [🧩 Plugins](docs/plugins.md) +* [Release notes](CHANGELOG.md) ## Support server -If you need help with setting up the bot or would like to discuss other things related to the bot, join the support server on Discord here: +If you need help with setting up the bot or would like to discuss other things related to it, join the support server on Discord here: -https://discord.gg/vRuhG9R - -## Changelog -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