Documentation

Trap Documentation

Everything you need to set up, configure, and get the most out of Trap — the Discord bot that automatically detects and removes spam bots from your server.

Introduction

Trap uses a passive honeypot technique to catch spam bots. You designate a channel that looks interesting to bots (e.g., named #free-nitro or #giveaway) — any account that sends a message there is automatically identified as a bot and actioned.

Because legitimate users never interact with the trap channel (they either can't see it or are told not to), there are virtually zero false positives.

Tip: Name your trap channel something enticing to bots like #free-nitro, #giveaway, or #daily-rewards to maximize catch rate.

Installation

Adding Trap to your server takes less than a minute.

1
Invite Trap

Click the "Invite Bot" button and select your server. Make sure to grant all requested permissions — Trap needs them to manage members and channels.

2
Grant Administrator permission (recommended)

For Trap to ban/kick members and read all channels, Administrator permission is the easiest option. You can use a custom role with specific permissions instead — see Permissions.

3
Run /trap setup

Use the /trap setup command to point Trap at your trap channel and configure the action to take when a bot is detected.

4
You're protected

Trap is now active. Any account that sends a message in the trap channel will be automatically actioned and added to the global blacklist.

Setup

Creating the trap channel

Create a new text channel in your server. The name matters — choose something that attracts bots:

  • #free-nitro
  • #giveaway
  • #daily-rewards
  • #claim-prize

Make the channel visible to all members (including new joins). Do not put a slowmode or send any messages in it — leave it completely empty and inviting.

Configuring Trap

Run /trap setup in any channel. You'll be prompted to:

  • Select the trap channel
  • Choose an action: ban, softban (ban + unban to clear messages), or kick
  • Optionally select a log channel for moderation events
Recommendation: Use ban as the action. This adds the bot to the global blacklist and prevents them from rejoining. Softban is useful if you want to clear the bot's recent messages as well.

Trap Channel

The trap channel is the core of Trap's detection system. Here's how to get the most out of it:

Channel setup tips

  • Keep it empty — no pinned messages, no bot responses, no nothing
  • Allow @everyone to send messages in the channel
  • Place it near the top of your channel list for visibility
  • Don't put a topic or description that warns users away

Updating the trap channel

You can change the trap channel at any time by running /trap setup again. Your previous configuration will be overwritten.

Disabling protection

To temporarily disable Trap without losing your configuration, run /trap disable. Re-run /trap setup to re-enable.

Actions

When a bot triggers the trap, Trap can take one of three actions:

ban Recommended
Permanently bans the account from your server and adds it to the global blacklist. The ban is applied instantly and the account cannot rejoin.
softban
Bans and immediately unbans the account. This removes the account's recent messages (up to 7 days) while still allowing rejoin. Also adds to the global blacklist.
kick
Kicks the account from the server. The account can rejoin. Does not add to the global blacklist. Use this only if you want a gentler approach.

Permissions

Trap requires the following Discord permissions to function correctly:

Permission Required Why
Ban Members To ban detected bots
Kick Members To kick detected bots (softban/kick action)
Read Messages To monitor the trap channel
Send Messages To send log and confirmation messages
Embed Links To send formatted log embeds
Manage Channels Not required
Administrator Not required, but simplifies setup
Important: Trap's role must be higher in the role hierarchy than the roles of accounts you want to ban. Otherwise Discord will prevent the ban action.

/trap

The main command group for configuring Trap on your server.

/trap setup Admin
Configure Trap for your server. Select the trap channel, action type, and optional log channel. This command must be run before Trap is active.
Parameters:
channel — The trap channel (required)
action — ban / softban / kick (required)
log_channel — Where to send action logs (optional)
/trap disable Admin
Temporarily disables Trap on your server. The configuration is preserved — run /trap setup to re-enable. No bans will be issued while disabled.
/trap reset Admin
Completely resets Trap's configuration and deletes all event logs for your server. This action is irreversible — a confirmation prompt will be shown before proceeding.

/blacklist

Commands for interacting with the global blacklist.

/blacklist check Admin
Check if a specific user is on the global blacklist. Returns their entry details including when they were added, which server flagged them, and the reason.
Parameters:
user — The user to check (mention or ID, required)
/blacklist list Owner Only
Lists the 10 most recently added entries to the global blacklist. Only available to the bot owner.

/stats-trap

/stats-trap Admin
Shows statistics for your server: total bots caught, permanent bans, softbans, and your current Trap configuration (channel, action, status).
Parameters:
guild_id — View stats for another server (owner only, optional)

/help

/help Public
Displays an overview of all available commands, how Trap works, and links to documentation. Visible to all users in your server.

Global Blacklist

The global blacklist is one of Trap's most powerful features. When a bot is caught on any server running Trap, its account ID is added to a shared database.

Servers using Trap automatically receive protection from every bot ever caught on any other server — even ones that have never visited your server before.

How it works

  • A bot triggers the trap on Server A → banned + added to global blacklist
  • The same bot account joins Server B (also using Trap) → automatically banned on arrival
  • The blacklist grows every time any Trap server catches a bot

False positives

If you believe a legitimate user was incorrectly added to the blacklist, join our Support Server and open a ticket. We'll review the entry and remove it if appropriate.

Note: The global blacklist only contains accounts that actively triggered a trap channel. Accounts that are simply suspicious are never added automatically.

FAQ

Will Trap ban real users?

Only if they send a message in the trap channel. As long as your trap channel is properly set up (not announced, not obvious), real users never interact with it. The false positive rate is effectively zero in normal conditions.

Can I use multiple trap channels?

Currently, Trap supports one trap channel per server. You can change it at any time with /trap setup.

What happens if Trap goes offline?

Trap will catch any messages sent during downtime once it reconnects. Messages are not lost — Discord's API delivers them when the bot comes back online.

Do I need a trap channel already created?

Yes. Create the channel first, then run /trap setup and select it. Trap does not create channels automatically.

How do I remove Trap from my server?

Simply kick Trap from your server via Discord's server settings. Your configuration data will be cleaned up automatically within 30 days, or you can run /trap reset before removing the bot.