9007f210ef
Introduce a rapidSpamTracker to detect same messages posted across channels within a short window and return prior message IDs for cleanup. Refactor spam detection to collect scannable text from message content, embeds and attachments, simplify role-ping and link heuristics, and mark spam when a role ping + link is duplicated across channels. Update index to use the tracker/collector, delete prior spam messages, improve moderation flow (ban → kick fallback), report clearer action/error labels, and warn about missing channel permissions. Update commands display text for detection/actions and bump .env.example MIN_ACCOUNT_AGE_DAYS default to 7.
24 lines
812 B
Bash
24 lines
812 B
Bash
DISCORD_TOKEN=your_bot_token_here
|
|
|
|
# Application ID from Developer Portal → General Information (needed for deploy-commands)
|
|
APPLICATION_ID=your_application_id_here
|
|
|
|
# Optional: deploy commands instantly to one server instead of waiting for global propagation
|
|
DEPLOY_GUILD_ID=
|
|
|
|
# Global defaults applied to every server (use /antispam in each server for per-server settings)
|
|
# Ban users when spam is detected (true/false)
|
|
BAN_ON_SPAM=true
|
|
|
|
# Delete message before banning
|
|
DELETE_MESSAGE=true
|
|
|
|
# Flag role mentions when the role has at least this many members
|
|
MAX_ROLE_MENTION_SIZE=50
|
|
|
|
# Extra strict on accounts younger than this many days (0 = disabled; 7 recommended for raid protection)
|
|
MIN_ACCOUNT_AGE_DAYS=7
|
|
|
|
# Comma-separated user IDs that bypass checks on all servers (e.g. bot owner)
|
|
TRUSTED_USER_IDS=
|