This bot watches one or more channels and, if anyone posts there, it bans the user and can delete their recent message history.
- Create your Discord bot in the Developer Portal.
- Leave Privileged Gateway Intents disabled. This bot does not read message content or member lists.
- Invite the bot with these permissions:
View ChannelsRead Message HistoryManage MessagesBan Members
- Copy
.env.exampleto.envand fill in values.
uv sync
uv run python bot.pydocker pull ghcr.io/ulnanlu/dc-honeypot:latest
docker run -d \
--name dc-honeypot \
--restart unless-stopped \
--env-file .env \
ghcr.io/ulnanlu/dc-honeypot:latestcp compose.example.yaml compose.yaml
docker compose pull
docker compose up -dBOT_TOKEN: your bot tokenHONEYPOT_CHANNEL_IDS: comma-separated channel IDs to monitorBAN_REASON: optional custom ban reasonLOG_CHANNEL_ID: optional channel ID for bot logsBAN_DELETE_MESSAGE_SECONDS: optional number of seconds of recent message history to delete on ban (0 to 604800, default86400)
- The bot only acts in guild text channels.
- The bot ignores other bots.
- If role hierarchy prevents a ban, the bot logs the failure (if
LOG_CHANNEL_IDis set).