Skip to content

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, .vbs and other obviously dangerous file types
  • Stop oversize uploads in support channels
  • Lock a channel to only .png/.jpg/.gif (art-share servers)

Settings

SettingWhat it does
Modedeny — list contains extensions to BLOCK. allow_only — list contains the ONLY extensions allowed.
ExtensionsComma-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 caseSetup
Block obviously dangerousMode=deny, list=exe/scr/bat/vbs/msi/com/jar, no size limit
Image channelMode=allow_only, list=png/jpg/jpeg/gif/webp, max_size=10 MB
Stop big uploadsMode=deny, list=(empty), max_size=5 MB

Limits

  • 6 actions per rule

Behaviour

  • Extension is read from the filename, lowercased. Photo.PNG and Photo.png are both png.
  • Phantom doesn't inspect file contents — a renamed evil.exe → safe.png would slip through this rule. Discord and the user's OS still warn on actual content type mismatches.
  • One hit per offending attachment.

Phantom is a product of Hydra Labs. The bot is run as a managed service; you do not need to host it yourself.