Guide
Set up AutoMod
AutoMod is Discord's own filter. It blocks a message before anyone sees it. SfwBot writes and maintains the rules for you from the dashboard and connects them to trust and logging.
How it works
When you switch AutoMod on in the dashboard, SfwBot creates rules in your server's Discord settings. Their names start with [SfwBot], so you can tell them apart. Rules you created yourself are never changed.
From then on Discord does the filtering. SfwBot's part is to:
- keep the rules in step with your dashboard settings, right after you save and again at regular intervals
- report in the dashboard whether each rule was synced
- record a trust violation and a log entry when one of its rules fires
AutoMod checks text, not media, and uses no credits. For an overview of the feature see AutoMod.
Before you start: the bot needs the Manage Server permission to create rules. If it is missing, the AutoMod page shows a warning with a link to add the bot again.
Set it up in the dashboard
Limits such as the number of keywords are listed in the [settings reference](/docs/settings).
Open AutoMod
In the dashboard, open your server and go to AutoMod. There is no slash command for AutoMod.
Switch it on
Turn on Manage AutoMod rules.
Choose an alert channel
Under Alerts, pick the Alert channel where Discord posts a notice when a rule blocks a message.
Switch on rules
Under Rules, turn on what you need. Profanity and Custom keyword block are available on every plan.
Add keywords and packs
For the custom keyword block, add your own Block keywords or switch on Curated packs, ready-made lists for a known problem. Use Allow keywords for words that must pass even though they contain a blocked one.
Add exemptions
Under Exempt roles and Exempt channels, choose who and where the rules do not apply.
Save and check the sync
Choose Save changes, then look at Sync with Discord. It shows for each rule whether Discord accepted it.
Rules on every plan
Custom keyword block
Blocks messages that contain one of your keywords, with an optional timeout.
Profanity
Discord's ready-made profanity filter.
Curated packs
The packs Discord Nitro scams and Self-promotion and DM bait add maintained keyword lists to your keyword block.
Rules on Plus and Pro
These rules come with Plus and Pro. See [pricing](/pricing).
Slurs and sexual content
Discord's ready-made filters for slurs and for sexual content.
Mention spam
Blocks messages with too many mentions, with optional raid protection.
Spam detection
Discord's built-in detection of spam messages.
Username and nickname filter
Blocks usernames and nicknames that match a keyword list.
Regex patterns
Pattern rules for cases a keyword cannot describe.
More packs and keywords
Packs for crypto and wallet scams, IP grabber and logger domains, raid and token logger bait and look-alike URLs, plus a higher limit for block keywords.
What happens on a violation
- Discord blocks the message. It is never posted, so there is nothing to delete.
- The member is timed out, if the timeout of that rule is on. Discord applies it.
- Discord posts an alert in your alert channel.
- SfwBot posts a log entry in your log channel. See logging.
- Trust is deducted, if you use trust and strikes. Each rule is its own violation, and all are low tier by default. You can change the tier or switch a violation off in the trust settings.
- The member is told about the trust loss by direct message, if trust is set to tell members and the member opted in with
/dms.
The reason SfwBot stores for an AutoMod violation is deleted after 30 days.
Exemptions
Exempt roles and exempt channels apply to the rules SfwBot manages. Discord limits how many roles and channels a rule can exempt, and the dashboard tells you when you reach the limit.
Discord itself never applies AutoMod to members who have the Administrator or Manage Server permission. That is why a rule often seems broken when an owner or moderator tests it. Test with an ordinary member account.
Troubleshooting
- The page says SfwBot is missing the Manage Server permission. Give the bot's role that permission, or add the bot again with the link on the page. The rules sync on the next save.
- A rule shows a sync error. Discord rejected it. The status names the reason, for example a keyword Discord does not accept or an invalid pattern. Fix the entry and save again.
- A rule does not fire for you. You are exempt as an administrator or moderator, or you have an exempt role.
- The status says Discord allows only one rule of this kind. Discord allows one rule per server for each of these: commonly flagged words (which Profanity, slurs and sexual content share), spam detection, mention spam and the username filter. Your server already has its own rule of that kind, and SfwBot does not touch rules it did not create. The message names the rule. Delete it in Discord's AutoMod settings and save again; the other SfwBot rules keep working in the meantime.
- You edited a
[SfwBot]rule in Discord and the change is gone. SfwBot restores its rules to match the dashboard. Change them in the dashboard instead. - A rule cannot be switched on. It comes with Plus and Pro, and your server is on the free plan.
- Blocked messages do not cost trust. Trust is off, or that violation is switched off in the trust settings.
Common questions
Does SfwBot change my existing AutoMod rules?
No. It only creates and updates rules whose names start with [SfwBot].
Why does a rule not block my own test message?
Discord does not apply AutoMod to members with the Administrator or Manage Server permission. Test with an ordinary member account.
Should I use AutoMod or the spam filter?
They complement each other. AutoMod blocks a message before it appears. The spam filter counts messages over time and catches flooding.