Baka-Bot logo Baka-Bot

Anti-Spam Discord Bot

Documentation

All commands are Discord slash commands — type / in any channel to see them.

How spam detection works

Baka-Bot tracks the last 10 messages per user, per server. When a user sends the same message content repeatedly within the configured time window, the following happens:

Warnings are kept for 24 hours so moderators can still act on them. Message history is cleared 20 minutes after the last message if no active warning exists.

Quick setup

  1. Invite Baka-Bot and ensure it has Kick Members and Manage Messages permissions.
  2. Run /setlogchannel #your-mod-logs so every action is recorded.
  3. Optionally tune /setlimit and /setwindow for your community's needs.
  4. That's it — Baka-Bot is now actively monitoring every message.

Configuration commands

Require the Administrator permission.

/setlimit Administrator

Set how many identical messages within the time window triggers spam detection.

  • limit Integer — minimum 3, maximum 10.
/setwindow Administrator

Set the sliding time window used for detection. Messages older than this are ignored.

  • seconds Integer — maximum 900 (15 minutes).
/setlogchannel Administrator

Set a text channel where Baka-Bot posts every warning, kick, cleanup, and reset event.

  • channel Text channel mention.

Moderation commands

/cleanup Manage Messages

Delete all of a user's recently tracked messages across every channel, without kicking them. Useful when a user spammed but you don't want to remove them from the server.

  • member The user whose messages should be deleted.
/resetviolations Manage Messages

Clear a user's message history and dismiss their active warning embed. Their violation count resets to zero — the bot treats them as a new user.

  • member The user to reset.
/kick Kick Members

Manually kick a user. Optionally deletes their tracked messages at the same time and cleans up any open warning embed.

  • member The member to kick.
  • reason Optional. Shown in the audit log. Default: "No reason provided".
  • cleanup Optional boolean. Also delete their tracked messages. Default: true.

Warning embed buttons

When Baka-Bot issues an automatic warning, the embed includes three moderator buttons. These are visible to anyone with the relevant permission.

🔨 Kick User Kick Members

Immediately kicks the warned user. The button is disabled and stamped with the moderator's name after use.

🧹 Clean Up Messages Manage Messages

Bulk-deletes all of the user's tracked messages across every channel. Does not kick. Button is disabled after use.

🔄 Reset Violations Manage Messages

Clears the user's history and dismisses the warning without any punishment. Use when the detection was a false positive.