* Updated to Eris 0.14.0, which changes the API url used to `discord.com` instead of `discordapp.com`
* API calls to `discordapp.com` are being phased out on Nov 7, 2020
* This means that bot versions prior to v3.2.0 *might stop working* on Nov 7, 2020
* New options: `allowBlock`, `allowSuspend`, `allowSnippets` ([#498](https://github.com/Dragory/modmailbot/pull/498) by [@lirolake](https://github.com/lirolake))
* These all default to `on`
* Improved error messages and error handling
* Removes at least one instance of ECONNRESET errors
* Fixed issue where NPM plugins would not install on Windows
* Fixed issue where mentions by the bot were not working in certain situations ([#496] by [@DarkView](https://github.com/DarkView))
* Fixed issue where long system messages (primarily from plugins) would not get chunked properly and would throw an error instead
**Plugins:**
* Make sure to check the [Eris 0.14.0 changelog](https://github.com/abalabahaha/eris/releases/tag/0.14.0) for any changes that might affect your plugins
* The `attachments` object now includes a new `saveAttachment()` function to save arbitrary attachments using the bot's `attachmentStorage`
* Fixed the `ignoreHooks` option for `threads.createNewThreadForUser()` not working
* Fixed `!newthread` throwing an error if a plugin cancels thread creation in the `beforeNewThread` hook
* Each thread is now assigned a number, increasing by 1 each thread. This can be used in commands like `!log` in place of the full thread ID.
* New option: `autoAlert`
* When enabled, the last moderator to reply to a modmail thread will be automatically alerted when the thread gets a new reply
* Auto-alert kicks in after a small delay after the reply to prevent alerts in the middle of an ongoing conversation. This delay is set by the option `autoAlertDelay`.
* New option: `pinThreadHeader`
* When enabled, the bot will automatically pin the "thread header" message that contains the user's details
*`!thread` is now an alias for `!log`/`!loglink`
* Fix some bugs with the `mentionRole` option
*`mentionRole = off` now behaves the same as `mentionRole = none`
* Fixed snippet previews (via `!snippet snippet_name_here`) sometimes cutting off the first word ([#491](https://github.com/Dragory/modmailbot/pull/491) by @Gugu7264)
* When calling `threads.createNewThreadForUser()`, plugins can now specify `mentionRole` as one of the options to override the default mentionRole config option value for the new thread
* **BREAKING CHANGE:** Logs from Modmail versions prior to Feb 2018 are no longer converted automatically
* 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.
* **BREAKING CHANGE:** Added support for Node.js 13 and 14, **dropped support for Node.js 10 and 11**
* The supported versions are now 12, 13, and 14
* **BREAKING CHANGE:** The bot now requests the necessary [Gateway Intents](https://discord.com/developers/docs/topics/gateway#gateway-intents)
* **This includes the privileged "Server Members Intent"**, which is used for server greetings/welcome messages.
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.
* 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`
* 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 messages containing *only* a large number (e.g. an ID) rounding the number
* Plugins can now store *metadata* in threads and thread messages via new `setMetadataValue` and `getMetadataValue` functions on `Thread` and `ThreadMessage` objects
* Fix regression introduced in v2.24.0 where line breaks would get turned to spaces in replies and snippets ([#304](https://github.com/Dragory/modmailbot/issues/304))
* Add update notifications. The bot will check for new versions every 12 hours and notify moderators at the top of new
modmail threads when there are new versions available. Can be disabled by setting the `updateNotifications` option to `false`.
New available versions are also shown in `!version`.
* If you have forked the repository and want to check for updates in your own repository instead,
change the `repository` value in `package.json`
* Add basic support for plugins. See the **Plugins** section in README for more information.
* Add support for snippet arguments. To use these, put {1}, {2}, etc. in the snippet text and they will be replaced by the given arguments when using the snippet.
* Add support for multiple `mentionRole` config option values in an array
* Add `commandAliases` config option to set custom command aliases
* Add support for timed blocks. Simply specify the duration as the last argument in `!block` or `!unblock`.
* Add `requiredTimeOnServer` and `timeOnServerDeniedMessage` config options to restrict modmail from users who have just joined the server. Thanks [@reboxer](https://github.com/reboxer) ([#270](https://github.com/Dragory/modmailbot/pull/270))!
* Add `attachmentStorage` option to control where attachments are saved. Currently supported:
*`"local"` (default) - Same as before: attachments are saved locally on the machine running the bot and served through the bot's web server
*`"discord"` - Attachments are saved on a special Discord channel specified by the `attachmentStorageChannelId` option
* Add `syncPermissionsOnMove` option. When enabled, thread channel permissions are synced with the category when the thread is moved with `!move`.
* Add support for scheduling `!suspend`. Works the same way as with `!close`, just specify the time after the command. Can be cancelled with `!suspend cancel`.
* Scheduled `!close` can now be silent - just add `silent` as an argument to the command before or after the schedule time
* The schedule time format for `!close` is now stricter and times with whitespace (e.g. `2 h 30 m`) no longer work. Use e.g. `2h30m` instead.
*`!loglink` can now be used in suspended threads
* User can now be mentioned in `botMentionResponse` by adding `{userMention}` to the response text. Thanks @reboxer (#225)!
* Fixed a small mistake in README, thanks @GabrielLewis2 (#226)!
* Config files are now parsed using [JSON5](https://json5.org/), allowing you to use comments, trailing commas, and other neat things in your config.json
* When using multiple main guilds, the originating guild name is now always included at the top of the thread (if possible).
Previously, if the user that messaged modmail was on only one of the guilds, the guild name would not be shown at the top.
* Fixed crash when a user edited a message in their DMs with modmail without an open thread
* Small fixes to category name matching when using `!move`
* Fixed crash when the bot was unable to send an auto-response to a user
* Added option `pingOnBotMention` (defaults to `true`) that allows you to control whether staff are pinged when the bot is mentioned
* Long messages are now chunked so they don't fail to send due to added length from e.g. user name
* Add thread suspending. A modmail thread can now be suspended with `!suspend`. Suspended threads will function as closed until unsuspended with `!unsuspend`.
* Added `mentionRole` configuration option ([#59](https://github.com/Dragory/modmailbot/pull/59)). This option can be used to set the role that is pinged when new threads are created or the bot is mentioned. See README for more details.
* Added the ability to schedule a thread to close by specifying a time after `!close`, e.g. `!close 1h`. The scheduling is cancelled if a new message is sent to or received from the user.
* If the `typingProxy` config option is enabled, any time a user is typing to modmail in their DMs, the modmail thread will show the bot as "typing"
* If the `typingProxyReverse` config option is enabled, any time a moderator is typing in a modmail thread, the user will see the bot "typing" in their DMs
* Rewrote large parts of the code to be more modular and maintainable. There may be some new bugs because of this - please report them through GitHub issues if you encounter any!
* Threads, logs, and snippets are now stored in an SQLite database. The bot will migrate old data on the first run.
* Small attachments (<2MB)fromuserscannowberelayedasDiscordattachmentsinthemodmailthreadwiththe`relaySmallAttachmentsAsAttachments`configoption.Logswillhavethelinkasusual.
* Some code clean-up. Please open an issue if you encounter any bugs!
* The bot now throws an error for unknown options in `config.json` (assuming they're typos) and tells you if you haven't configured the token or mail guild id.