-
Notifications
You must be signed in to change notification settings - Fork 4
Modmail enchanced feature support
Important
This information is out of date. Currents plans are to maintain an exclusive fork OpenModmail further designed around compatibility with modmail-viewer based on the changes mentioned here. raidensakura/modmail also exists and contains many of the changes and a number of others.
Warning
This page is written for functionality scheduled for Modmail-Viewer v1.0.0 and above, which is only available the the develop branch. Additionally, none of the features in OpenModmail have been merged into stable and released. Many are available in raidensakura/modmail
Many new features of Modmail-Viewer are not functional with the mainline Modmail bot. In order to gain enhanced feature support, you'll need to use raidensakura/modmail. This is a hard fork of Modmail with many fixes, new features, and some codebase refactors.
Enhanced Feature Support consists of features that are do not exist in Mainline Modmail, but enhance the functionality and integration of modmail-viewer. For various reasons they were unlikely to be merged into mainline, either due to scope, or the pace of development in mainline modmail.
- Functional attachment type detection (modmail does not detect images properly)
- Copy Discord URLs for direct messages
- Modmail command Audit logging
Unfortunately, raidensakura/modmail is not directly compatible with mainline modmail due to database schema changes. Luckily, Migrating requires only running a command after switching over to the modmail fork.
In the fork, I have completely rewritten the blocklist system to make better use of MongoDB features. For users, this should result in better performance, a potentially significantly smaller config document, and better information about new blocks. Historically, Modmail blocking was poorly written and lead to a mass accumulation of blocked users in the config, breaking the block command (I PR'd a fix in mainline modmail for this, it's still in develop) and causing other issues. The new system stores more data in a better future proof format, and allows MongoDB to automatically cull blocks that have expired. Additionally, users that can't message the bot due to minimum age requirements (account, guild) are not stored as blocked. The whitelist remains unchanged.
First, you should back up your Modmail Config collection.
Once you've started the bot, run ?migrate blocklist
, and wait for the migration to complete. After this, your blocklist will have been migrated to the new schema and your config will have all historical blocks removed from it. Outdated and invalid blocks are automatically removed, and the modmail Config will have all blocks removed. Unfortunately, legacy blocks do not contain enough information to fully fill out the new blocklist format, so migrated legacy blocks in the new system will lack information such as their timestamp, and the staff member who created the block. The reason will contain the text of the legacy block along with text saying it was migrated.
It's critical you run this migration, as legacy blocks will not function until you migrate, and the bot will display a warning at launch.
See the changelog for all changes
Here's a brief highlight of changes:
- Discord username change support
- An optimize dockerfile (my dev build is 171 MB)
- CairoSVG dependency removal
- Upgraded Discord.py (2.3)
- Allow specifying a custom database name (if you want multiple bots -> mongodb server)
- Replies in Modmail threads actually work
- An included Logviewer plugin (with oauth2, slightly more features, and security fixes), if you decide not to use modmail-viewer.
- Title and NSFW commands will immediately update the database with the new changes.
- Fixed genesis message errors when a user with no roles creates a modmail thread.
- View all recipients of a thread.
- Supports dm channel id storage (require for getting the direct links of most messages)
- removal of support for sticker messages
As always, if you use a fork or modmail-viewer, the modmail team will not provide you any support with issue. The flip side is your issue is more likely to get fixed if it is an issue with core modmail. If you do run into issues and need support, you can change back to Mainline Modmail and attempt to replicate the issue then. You will lose block functionality while you do so, but you'll be eligible for support from the Modmail Developers' support team and not just the forks' contributors.