Attachments
Block file uploads by extension, or by file size, or restrict uploads to an allow-list of types.
When you'd use it
- Stop
.exe,.scr,.bat,.vbsand other obviously dangerous file types - Stop oversize uploads in support channels
- Lock a channel to only
.png/.jpg/.gif(art-share servers)
Settings
| Setting | What it does |
|---|---|
| Mode | deny — list contains extensions to BLOCK. allow_only — list contains the ONLY extensions allowed. |
| Extensions | Comma-separated, no dots. e.g. exe, scr, bat, vbs, msi. |
| Max size (MB) | Reject attachments above this size. 0 disables the size check. |
Tips
- The dangerous-file deny list that catches the most without false positives:
exe, scr, bat, vbs, msi, com, jar, lnk, ps1. - Allow-only mode is high-friction. Set it only on channels with a clear purpose (
#art,#screenshots). - Size limits don't replace Discord's — Discord enforces 25 MB for free servers / 50 MB for nitro-boosted / 100 MB for tier-3. The Phantom limit is on top, scoped per-channel.
- Each attachment in a multi-file message is checked independently. If one attachment trips, the rule fires; other attachments in the same message aren't separately recorded.
Common patterns
| Use case | Setup |
|---|---|
| Block obviously dangerous | Mode=deny, list=exe/scr/bat/vbs/msi/com/jar, no size limit |
| Image channel | Mode=allow_only, list=png/jpg/jpeg/gif/webp, max_size=10 MB |
| Stop big uploads | Mode=deny, list=(empty), max_size=5 MB |
Limits
- 6 actions per rule
Behaviour
- Extension is read from the filename, lowercased.
Photo.PNGandPhoto.pngare bothpng. - Phantom doesn't inspect file contents — a renamed
evil.exe → safe.pngwould slip through this rule. Discord and the user's OS still warn on actual content type mismatches. - One hit per offending attachment.
Related pages
- Automod overview
- Security → Anti-Scam — image-based scam detection for screenshots
