Skip to content

A Discord moderation bot, built from blocks

Moderation is mostly a few slash commands that take a member and a reason, plus rules that act on their own. Bot Creator has one block per action, and a block that creates Discord AutoMod rules.

How to build it

  1. Create a Slash command with a user option and a reason option. The values are read as ((opts.user.id)) and ((opts.reason)) (use the option names you chose).
  2. Add the action block: Ban User (with the number of days of messages to delete), Kick User, Mute User (a timeout, with a duration such as 10m or 1h), Unmute User or Unban User.
  3. Add Respond with Message to confirm, and tick the private reply option so only the moderator sees it.
  4. For clean-up, use Delete Messages (a count, optionally only one user’s messages, or only bots or only users) and Slowmode (a duration, 0 to disable).
  5. For rules that act on their own, use Create AutoMod Rule: trigger on keywords, spam, keyword presets or mention spam, and block the message, send an alert to a channel or time the member out.

Blocks you will use

Block names are the ones of the app; each links to its entry in the dictionary.

What to know

  • The bot needs the matching permission on your server, and its role must sit above the role of the member it acts on (Discord rule).
  • There is no ready-made warning or case-log block. You build a warning count with per-member variables; the BDFD warn-system guide shows the idea.
  • To limit who can use a slash command, use Discord’s own command permissions (Server Settings, Integrations).

Go further

Other things you can build