v3.0.0
⚠️ ⚠️ ⚠️ BREAKING CHANGE ⚠️ ⚠️ ⚠️
This release contains breaking changes, if you pull it without reading this your bot will stop working
What's changed?
For users
Message commands are no longer supported.
The reason for this is that the current system of parsing message commands and having to deal with two different types of commands in one causes a lot of overhead and is very hard to maintain. Slash commands have a few advantages (namely: clearly communicating options and their meanings, ephemeral replies, permission management for server owners, clear feedback on missing options and expected types before sending the command) and are generally a more user-friendly way to handle commands.
New permission system
Moderator roles and ModBot requiring specific permissions for each command are a relic of the past. Discord has introduced a new permission system which allows server owners to manage who has access to which commands directly from the Discord app. This gives much more granular control for fine-tuning permissions. ModBot will still register default permissions for most commands, so you don't have to fear someone gaining access to ban people unless you allow them to yourself.
You can manage the permissions for each command by opening the Discord server settings and navigating to Integrations --> ModBot.
Moderator roles will be transferred to protected roles by default, so they will be protected from ModBot's Auto-Mod and other moderators, just like they were before.
Buttons for common actions on the user info embed
ModBot now provides custom buttons to moderate a user or view more information about them, right from their user info embed. We also added new custom emojis to the information, buttons and even the confirmation when you successfully moderated a user.
If a user is muted, banned, has strikes etc. relevant buttons will automatically appear and irrelevant ones will disappear:
Context Menus and Modals
ModBot now makes more use of recent features like Context Menus, Modals and Select Menus. Right-clicking on a user and hovering over apps will reveal the new context menus to ban, strike, mute or kick a user. There's also a context menu to view their User info embed, which shows the buttons mentioned above. Clicking one of these will summon a modal where you can enter additional data like a reason, a duration or a strike count:
Prevent accidental duplicate moderations
If a user has been moderated by a different moderator in the last 5 minutes, you will be prompted with these moderations and have the option to punish them anyway or cancel your action:
Autocomplete reasons, durations and many other options
When you try to moderate a user, ModBot will automatically suggest your most used reasons and durations for this type of moderation in this server:
Group settings commands
All settings are now sub-commands of the /settings
command. The old /settings
command has been moved to /settings overview
.
This makes using the permission system easier, as you don't have to set the same permission for dozens of different settings commands.
Select other articles or videos
When searching for an article or video, the original author can now pick a different article/video after the embed was generated:
Default Configuration
Most Auto-Mod features are now enabled by default for new guilds. It will also set up a list of punishments by default.
This will not overwrite any of your existing settings. If you have modified any of your guild settings since August 2021 then nothing will change for your guild.
Remove mention limit
Since Discord added their own mention limit to the Auto-Mod settings for community servers, this feature no longer makes sense. Using Discord's Auto-Mod actually prevents the message from being sent and users from being notified, which bots can't do.
So go use the Discord provided method, it's much better. Traditional bad words and such will stay as they currently offer more features (like Regular Expression support) which Discord is yet to implement.
Remove raid mode
ModBot's raid mode works by kicking any new members that join your guild. While ModBot tries to send them a short message explaining why they were kicked, this can still be very confusing for new Members. Additionally, this feature required a lot of API calls that can easily be avoided. Discord has released a new feature to pause your invites recently. This is a very good replacement, as it educates users on what the issue is, even if they have disabled direct messages.
Removal of the help command
Since Slash commands contain descriptions, available options and types, this command is no longer useful and has been removed.
Removal of the eye reaction
ModBot will no longer spy on its users 👀
Small improvements
- ModBot will stop running Auto-Mod checks once a message has been deleted
- ModBot will log bulk deletes (within certain limitations) and attachments of deleted messages
- Too large exports will now be compressed using gzip. If it's still too large, the bot will show a better error message instead of just failing to upload it.
- The info command now contains more information, including a version number
- Mutes that use a muted role and are now transferred to timeouts when they cross the API threshold
- You can now edit the count and duration of a moderation
- Users that trigger Auto-Mod will be timed out for 10 seconds
- Auto-Mod content filters will now be executed when a message is edited.
For self-hosting
Changed config keys!
Some config variables have been renamed to make the naming scheme more consistent:
auth_token
is now calledauthToken
db
is now calleddatabase
prefix
has been removed- Google cloud credentials (previously only used for logging) have been moved, refer to CONFIGURATION.md for details.
Node 16.9.0
Due to a version bump in discord.js, NodeJS version 16.9.0 or higher is required.
Loading configuration form environment
Every configuration option can now be loaded from environment variables. For more info, check the new CONFIGURATION.md file
Custom emojis
ModBot now uses custom emojis for a few things if you set them up. For more info, check the new CONFIGURATION.md file
Safe Search
ModBot can now use the Google vision API to scan images for inappropriate content. This is only available on guilds in the feature whitelist and vision must be enabled on your instance.
Technical changes
- Update to discord.js v14
- Use es6 imports
- Move "features" to event classes
- Move "checks" to interval classes
- Command can now have cooldowns, and the export command now has a 1-minute cooldown.
- Almost all code has been completely refactored. If you've made any changes to ModBot, it's probably easiest to start with v3 and manually apply these changes again.