Message filters
Automatically delete messages with blocked words, blocked links or Discord invites, keep image-only channels clean, and log what was removed.
On this page
- Before you start
- Set it up
- Set it up from Discord
- Settings explained
- How blocked words match
- How blocked URLs match
- How the invite limit works
- How image-only channels work
- Edited messages are checked too
- Placeholders
- Examples
- Troubleshooting
- Blocked messages aren't being deleted
- Normal messages are being deleted
- Invites are allowed everywhere
- Nothing appears in the log channel
- My new channel isn't in the channel list
- Related
Message filters remove unwanted messages the moment they're posted, so your moderators don't
have to. Block specific words, block links to certain sites, keep Discord invites in one
channel, and turn channels like #art or #screenshots into image-only channels.
Before you start#
Members with the Ban Members permission skip every filter on this page, so your moderators can quote a blocked word or post an invite when they need to. Messages from bots are also ignored.
Set it up#
It's under Moderation in the sidebar.
In Filter logs and invite links, pick a Profanity log channel and a Blocked URL log channel (they can be the same staff channel). Leave them disabled if you don't want logs.
Pick a Discord invite channel. Invites are then only allowed there. Click Save filter settings.
In Blocked words, type a word and click Add. Repeat for each word or phrase.
In Blocked URLs, type a site such as example.com and click Add.
In Image only channels, click Add channel, pick the channel, write a Reply message and click Add image only channel.
Changes reach the bot within about a minute.
Set it up from Discord#
Run /setup feature:Message Filters (or /setup → Moderation & safety → Edit next to
Message filters). Pick the Profanity log, Blocked URL log and Invite channel from
the menus. Blocked words and Blocked URLs open their lists: press Add words (or
Add URLs) to add up to 25 at once, one per line, and pick one from the menu to unblock it.
Image-only channels lists those channels: Add channel makes a new one, and picking one
lets you change its channel or Reply message, or remove it.
Settings explained#
| Setting | What it does | Default |
|---|---|---|
| Profanity log channel | Gets a copy of every message removed for a blocked word. | None |
| Blocked URL log channel | Gets a copy of every message removed for a blocked URL. | None |
| Discord invite channel | The only channel (and its threads) where Discord invite links are allowed. Leave it disabled to allow invites everywhere. | None |
| Blocked words | Words or phrases that get a message deleted. | None |
| Blocked URLs | Text that gets a message with a link deleted, such as a domain. | None |
| Image only channels | Channels where every message must include an image. Each one has its own Reply message. | None |
The Spam alerts card on the same page is covered in Spam alerts.
How blocked words match#
- Matching ignores upper and lower case: blocking
noobalso catchesNOOBandNoob. - Only whole words count. Blocking
assdoes not touchclassorgrass. - You can block a phrase with spaces, like
free nitro. The whole phrase has to appear.
How blocked URLs match#
A blocked URL is matched anywhere in the message text, ignoring case. That makes it broad on
purpose: blocking example.com also catches www.example.com/page and notexample.com. Use
the most specific text you can.
How the invite limit works#
When a Discord invite channel is set, any message containing discord.gg/,
discord.com/invite/ or discordapp.com/invite/ posted anywhere else is deleted, and the member
is pointed to the right channel. Removed invites are not sent to a log channel.
How image-only channels work#
A message is kept only if it has at least one attachment and every attachment is an image (PNG, JPG, GIF, WebP, BMP, TIFF, AVIF, HEIC or SVG). A caption alongside the image is fine. Plain text, links, videos and other files are deleted. Image-only rules apply to the channel itself, not to threads inside it.
Edited messages are checked too#
Buddy re-checks a message when it's edited, so members can't post something clean and edit a blocked word in afterwards. Logs for edited messages say (edited message) in the title.
Placeholders#
Use these in an image-only channel's Reply message.
| Placeholder | Becomes |
|---|---|
{author} | A mention of the member who posted |
{server} | Your server's name |
{members} | Your member count |
{role:ROLE_ID} | A mention of a role, e.g. {role:123456789012345678} |
{user:USER_ID} | A mention of a user by ID |
{channel:CHANNEL_ID} | A link to a channel by ID |
Examples#
A friendly reply for a screenshots channel:
{author}, this channel is for screenshots only! Chat about them in {channel:123456789012345678}.What the member sees after posting text in an image-only channel (the reply deletes itself after a minute):
@Alex, this channel is for screenshots only! Chat about them in #screenshot-chat.
When a message breaks a word filter, Buddy deletes it and posts a short notice that also disappears after a minute:
@Alex please keep conversations family friendly.
The other notices read "you can not post that url." for a blocked URL, and "please post Discord Invites in #your-channel." for an invite.
What your staff see in the profanity log channel:
A short list of words you really don't want beats a giant list copied from the internet. Long lists catch normal conversation and frustrate members. Check your log channel for a few days and adjust.
Troubleshooting#
Blocked messages aren't being deleted#
- Make sure Buddy has Manage Messages and Send Messages in that channel. If either is missing, Buddy skips the delete and records it under Bot errors on your dashboard home page.
- The member may have Ban Members. Test with a regular member account.
- For words, check spelling and remember only whole words match.
- Wait a minute after adding a word or URL, then try again.
Normal messages are being deleted#
A blocked URL matches anywhere in the text, so a short entry like bit can match far more than
you expect. Make URL entries specific (a full domain). For words, remove entries that are also
part of everyday phrases.
Invites are allowed everywhere#
The invite limit only works when a Discord invite channel is selected and saved. If the channel was deleted from your server, pick a new one.
Nothing appears in the log channel#
Choose a Profanity log channel or Blocked URL log channel and save. Buddy needs Send Messages and Embed Links there. Invite removals and image-only removals are never logged.
My new channel isn't in the channel list#
The dashboard uses a saved copy of your channels. Run /setup in Discord and choose
Update Channels and Roles for Website, then reload the dashboard.