Update CHANGELOG for v3.0.0

cshd
Dragory 2020-10-27 19:15:26 +02:00
parent fa84fa6034
commit 4184ad17e9
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 76 additions and 14 deletions

View File

@ -1,17 +1,25 @@
# Changelog # Changelog
## v2.31.0-beta.3 (UNRELEASED) ## v3.0.0
**This is a beta release, bugs are expected.** *This changelog also includes changes from v2.31.0-beta.1 and v2.31.0-beta.2*
Please report any bugs you encounter by [creating a GitHub issue](https://github.com/Dragory/modmailbot/issues/new)!
**General changes:** **General changes:**
* Replies are now limited in length to the Discord message limit (including the moderator name and role in the DM sent to the user) * **BREAKING CHANGE:** Logs from Modmail versions prior to Feb 2018 are no longer converted automatically
* This was to fix issues with `!edit` and `!delete` when a reply spanned multiple messages * To update from a Modmail version from before Feb 2018, update to `v2.30.1` and run the bot once first. Then you can update to version v3.0.0 and later.
* Snippets can now be included *within* messages by wrapping the snippet name in curly braces * **BREAKING CHANGE:** Added support for Node.js 13 and 14, **dropped support for Node.js 10 and 11**
* E.g. `!r Hello! {{rules}}` to include the snippet `rules` in the place of `{{rules}}` * The supported versions are now 12, 13, and 14
* The symbols used can be changed with the `inlineSnippetStart` and `inlineSnippetEnd` options * **BREAKING CHANGE:** The bot now requests the necessary [Gateway Intents](https://discord.com/developers/docs/topics/gateway#gateway-intents)
* This feature can be disabled by setting `allowInlineSnippets = off` in your config * **This includes the privileged "Server Members Intent"**, which is used for server greetings/welcome messages.
* By default, the bot will refuse to send a reply with an unknown inline snippet. To disable this behavior, set `errorOnUnknownInlineSnippet = off`. This means that [**you need to turn on "Server Members Intent"**](docs/server-members-intent-2.png) on the bot's page on the Discord Developer Portal.
* Added support for editing and deleting staff replies via new `!edit` and `!delete` commands
* This is **enabled by default**
* This can be disabled with the `allowStaffEdit` and `allowStaffDelete` options
* Only the staff member who sent the reply can edit/delete it
* Renamed the following options. Old names are still supported as aliases, so old config files won't break.
* `mainGuildId` => `mainServerId`
* `mailGuildId` => `inboxServerId`
* `categoryAutomation.newThreadFromGuild` => `categoryAutomation.newThreadFromServer`
* `guildGreetings` => `serverGreetings`
* Moderators can now set the role they'd like to be displayed with their replies ("display role") by default and on a per-thread basis by using `!role` * Moderators can now set the role they'd like to be displayed with their replies ("display role") by default and on a per-thread basis by using `!role`
* Moderators can only choose roles they currently have * Moderators can only choose roles they currently have
* You can view your current display role by using `!role` * You can view your current display role by using `!role`
@ -26,20 +34,70 @@ Please report any bugs you encounter by [creating a GitHub issue](https://github
* This feature can be disabled by setting `allowChangingDisplayRole = off` * This feature can be disabled by setting `allowChangingDisplayRole = off`
* New option: `fallbackRoleName` * New option: `fallbackRoleName`
* Sets the role name to display in moderator replies if the moderator doesn't have a hoisted role * Sets the role name to display in moderator replies if the moderator doesn't have a hoisted role
* New option `logStorage`
* Allows changing how logs are stored
* Possible values are `local` (default), `attachment`, and `none`
* New **default** attachment storage option: `original`
* This option simply links the original attachment and does not rehost it in any way
* New option `reactOnSeen` ([#398](https://github.com/Dragory/modmailbot/pull/398) by @Eegras)
* When enabled, the bot will react to user DMs with a checkmark when they have been received
* The reaction emoji can be customized with the `reactOnSeenEmoji` option
* New option `createThreadOnMention` ([#397](https://github.com/Dragory/modmailbot/pull/397) by @dopeghoti)
* When enabled, a new modmail thread will be created whenever a user mentions/pings the bot on the main server
* As with `pingOnBotMention`, staff members are automatically ignored
* New option `statusType`
* Allows changing the bot's status type between "Playing", "Watching", "Listening"
* Possible values are `playing` (default), `watching`, `listening`
* New option `anonymizeChannelName` ([#457](https://github.com/Dragory/modmailbot/pull/457) by @funkyhippo)
* Off by default. When enabled, instead of using the user's name as the channel name, uses a random channel name instead.
* Useful on single-server setups where people with modified clients can see the names of even hidden channels
* New option `updateNotificationsForBetaVersions`
* Off by default. When enabled, also shows update notifications for beta versions.
* By default, update notifications are only shown for stable releases
* Snippets can now be included *within* messages by wrapping the snippet name in curly braces
* E.g. `!r Hello! {{rules}}` to include the snippet `rules` in the place of `{{rules}}`
* The symbols used can be changed with the `inlineSnippetStart` and `inlineSnippetEnd` options
* This feature can be disabled by setting `allowInlineSnippets = off` in your config
* By default, the bot will refuse to send a reply with an unknown inline snippet. To disable this behavior, set `errorOnUnknownInlineSnippet = off`.
* `mentionRole` can now be set to `none`
* Removed the long-deprecated `logDir` option
* The bot now notifies if the user leaves/joins the server ([#437](https://github.com/Dragory/modmailbot/pull/437) by @DarkView)
* Replies are now limited in length to the Discord message limit (including the moderator name and role in the DM sent to the user)
* This is to fix issues with `!edit` and `!delete` when a reply spanned multiple messages
* DM channel and message IDs are now stored
* Use `!loglink -v` to view these in logs
* Use `!dm_channel_id` in an inbox thread to view the DM channel ID
* *DM channel and message IDs are primarily useful for Discord T&S reports*
* Unless `fallbackRoleName` is set, anonymous replies without a role will no longer display "Moderator:" at the beginning of the message * Unless `fallbackRoleName` is set, anonymous replies without a role will no longer display "Moderator:" at the beginning of the message
* Plugins can now also be installed from NPM modules * Plugins can now also be installed from NPM modules
* Example: `plugins[] = npm:some-plugin-package` * Example: `plugins[] = npm:some-plugin-package`
* "Connection reset by peer" error (code 1006) is now handled gracefully in the background and no longer crashes the bot
* Multiple people can now sign up for reply alerts (`!alert`) simultaneously ([#373](https://github.com/Dragory/modmailbot/pull/373) by @DarkView)
* The bot now displays a note if the user sent an application invite, e.g. an invite to listen along on Spotify
* The bot now displays a note if the user sent a sticker, including the sticker's name
* Log formatting is now more consistent and easier to parse with automated tools
* Messages in modmail threads by other bots are no longer ignored, and are displayed in logs
* Added official support for MySQL databases. Refer to the documentation on `dbType` for more details.
* This change also means the following options are **no longer supported:**
* `dbDir` (use `sqliteOptions.filename` to specify the database file instead)
* `knex` (see `dbType` documentation for more details)
* System messages sent to the user, such as `responseMessage` and `closeMessage`, are now shown in the thread channel
* Fixed `!edit_snippet` crashing the bot when leaving the new snippet text empty
* Fix crash when using `!newthread` with the bot's own ID (fixes [#452](https://github.com/Dragory/modmailbot/issues/452))
* Fix occasional bug with expiring blocks where the bot would send the expiry message multiple times * Fix occasional bug with expiring blocks where the bot would send the expiry message multiple times
* Fix bug with long messages being cut off and only the last part being shown in the thread (most evident in long DMs and e.g. !edit notifications of long messages) * Fix bug with long messages being cut off and only the last part being shown in the thread (most evident in long DMs and e.g. !edit notifications of long messages)
* "Connection reset by peer" error (code 1006) is now handled gracefully in the background and no longer crashes the bot
* Fix messages containing *only* a large number (e.g. an ID) rounding the number * Fix messages containing *only* a large number (e.g. an ID) rounding the number
* Several common errors are now handled silently in the background, such as "Connection reset by peer"
**Plugins:** **Plugins:**
* Log storage functions `getLogUrl()`, `getLogFile()`, `getLogCustomResponse()` now take the entire thread object as an argument rather than the thread ID * Added support for replacing default message formatting in threads, DMs, and logs
* Log storage function `save()` can now return information about the saved log to be stored with the thread. This can then be accessed in e.g. `getLogUrl()` via `thread.log_storage_data`. * Added support for *hooks*. Hooks can be used to run custom plugin code before/after specific moments.
* Two hooks are initially available: `beforeNewThread` and `afterThreadClose`
* See plugin documentation for mode details
* If your plugin requires special gateway intents, use the new `extraIntents` config option
* Plugins can now access the bot's web server via a new `webserver` property in plugin arguments * Plugins can now access the bot's web server via a new `webserver` property in plugin arguments
* Plugins can now store *metadata* in threads and thread messages via new `setMetadataValue` and `getMetadataValue` functions on `Thread` and `ThreadMessage` objects * Plugins can now store *metadata* in threads and thread messages via new `setMetadataValue` and `getMetadataValue` functions on `Thread` and `ThreadMessage` objects
* Edit/delete notifications now have their own message type and formatter. The original message content is now included in the thread message's metadata (see above). * Plugins can access the API for setting/getting moderator display roles via a new `displayRoles` property in plugin arguments
* System messages now have a formatter * System messages now have a formatter
* The `beforeNewThread` hook's parameters now also include the original DM message object * The `beforeNewThread` hook's parameters now also include the original DM message object
* Plugins can now access the `threads` module (via `pluginApi.threads`) to create and fetch threads * Plugins can now access the `threads` module (via `pluginApi.threads`) to create and fetch threads
@ -47,6 +105,10 @@ Please report any bugs you encounter by [creating a GitHub issue](https://github
and to get the final role that will be displayed in moderator replies (by default or per-thread) and to get the final role that will be displayed in moderator replies (by default or per-thread)
**Internal/technical updates:** **Internal/technical updates:**
* Updated Eris to v0.13.3
* Updated several other dependencies
* New JSON Schema based config parser that validates each option and their types more strictly to prevent undefined behavior
* Database migrations are now stored under `src/`
* Modmail now uses [Express](https://expressjs.com/) as its web server for logs/attachments * Modmail now uses [Express](https://expressjs.com/) as its web server for logs/attachments
* Unhandled rejections are now handled the same as uncaught exceptions, and *will* crash the bot * Unhandled rejections are now handled the same as uncaught exceptions, and *will* crash the bot