Message filters
Automatically delete messages with blocked words or links, and keep Discord invite links in one channel. Staff with Ban Members are never filtered.
On this page
Message filters clean up your chat without a moderator lifting a finger. Add the words and links you don't want, and the bot deletes any message that contains them and reminds the member to keep it clean. You can also pick one channel for Discord invite links, so server advertising stays out of your main chat.
Before you start#
- Staff aren't filtered. Members with the Ban Members permission (and Administrators) can post anything. Test with a regular member account.
- Bots and webhooks are never filtered.
- If a channel is missing from the dashboard lists, run
/setupin Discord, choose Update Channels and Roles for Website, then refresh the page.
Set it up#
It's under Moderation in the sidebar.
In Profanity Words, type a word in Blocked Word and click Add. Repeat for each word. Remove one with the red trash button.
In URL Blocker, type a link or domain in Blocked URL and click Add.
In the Messages Filter card, choose a Discord Link Channel and click Update Bot Settings.
From an account without Ban Members, post a blocked word. The bot deletes it and posts a reminder.
Settings explained#
| Setting | What it does | Default |
|---|---|---|
| Profanity Words | Messages containing any of these words are deleted. | None |
| URL Blocker | Messages containing any of these links are deleted. | None |
| Discord Link Channel | The only channel (plus its threads and forum posts) where Discord invite links are allowed. Invites anywhere else are deleted. | Disabled |
| Profanity Log Channel | Meant to receive a copy of each message the word filter deletes. | Disabled |
| Blocked URL Log Channel | Meant to receive a copy of each message the URL blocker deletes. | Disabled |
The bot currently doesn't post copies to the Profanity Log Channel or the Blocked URL Log Channel. The filters still delete messages. To keep a record in the meantime, set a Message Updates Log on Server logs: every deleted message shows up there.
The same page also holds Image Only Channels. See Image-only channels.
How each filter works#
Profanity Words#
The bot checks every message against your word list. Matching ignores the case of the message but compares against your word exactly as you typed it, so add words in lowercase. A lowercase word blocks "word", "Word" and "WORD". A word with a capital letter never matches.
The check looks for the word anywhere in the message, even inside a longer word. Blocking
ass also blocks "class" and "grass", so choose your words with care.
When a message matches, the bot deletes it and posts this reminder, which deletes itself after 60 seconds:
@FarmerJoe please keep conversations family friendly.
The member doesn't get a warning case. If you want one on record, use /warn from the
warn system.
URL Blocker#
The URL blocker works the same way. If the message contains your blocked text anywhere, it's
deleted. Add entries in lowercase. Blocking a domain like example.com catches every link to
that site, with or without https:// and www..
@FarmerJoe you can not post that url.
The reminder deletes itself after 60 seconds.
Discord Link Channel#
When you pick a Discord Link Channel, the bot looks for invite links (discord.gg/,
discord.com/invite/ and discordapp.com/invite/) in every other channel. It deletes the
message and points the member to the right place:
@FarmerJoe please post Discord Invites in #partner-servers.
Invites are allowed in the chosen channel and in threads or forum posts inside it. The reminder deletes itself after 60 seconds. Choose Disabled - Select Channel to Enable and save to turn the invite limit off.
Order of checks#
The bot checks the word list first, then blocked links, then invites, then image-only channels. Once a message is deleted, the later checks are skipped, so the member only gets one reminder.
Examples#
A URL blocker list that stops link shorteners and IP grabbers, one entry per Add:
bit.ly
tinyurl.com
grabify.linkBecause words match inside longer words, a short entry can catch everyday farm talk. crap
also blocks "scrap metal". Try the word inside a few normal sentences before you add it.
Troubleshooting#
A blocked word isn't deleted#
- Make sure you tested from an account without Ban Members or Administrator.
- Check the word in your list is all lowercase. Delete it and add it again in lowercase if not.
- The bot needs Manage Messages and Send Messages in that channel.
Normal words are being deleted#
A short blocked word is matching inside a longer word (for example hell in "hello"). Remove the
short word, or replace it with a longer, more specific one.
Invite links aren't removed#
- Check a Discord Link Channel is saved. The invite limit is off while it's Disabled.
- Invite links posted in the chosen channel or its threads are allowed on purpose.
- Members with Ban Members can post invites anywhere.
Nothing appears in my profanity or URL log channel#
That's expected at the moment. See the note under Settings explained.