Skip to main content
Staff use /warn @member reason. The bot counts each member’s warnings, DMs them, and gives a timeout at 3 warnings.

Step 1: The variable

Make warnings: type User, storing a Number, scope Server Specific, starts as 0.

Step 2: /warn

  1. Make a slash command called warn.
  2. Add Inputs: a User input member (required) and a Text input reason (required).
  3. Add a permissions check (search permission): Moderate Members.
  4. On the yes path:
    • Do the maths on warnings, whose variable: the member from the input, + 1.
    • A block that sends a direct message to that member, with the reason (pick the reason input with Variables).
    • Reply: Warning given.
    • Compare: is that member’s warnings 3 or more?
    • On that yes path: the timeout block (search timeout) for 1 hour, then Save a value warnings back to 0 for that member.
  5. On the else path of the permissions check: Reply: Only moderators can warn people.

When a block fails

Some blocks can fail. For example, the bot cannot time out someone with a higher role, and a DM fails if the member has DMs closed. Many blocks have two extra paths:
  • the green path: “it worked”
  • the red path: “it failed”
Press the + on the red path and add a Reply like I couldn't do that. Is my role high enough? You can also choose what happens for the whole command in If something breaks on the first block: Explain the problem, My own message, Stay silent, Alert a staff channel, or Skip the broken block and continue.

More moderation blocks

Search the block list for these words: kick, ban, timeout, nickname, delete (messages), bulk (many messages at once).