Skip to main content
Keeping your ERLC Discord server safe is a constant job, but erlc.dev Studio lets you offload much of the routine work to automated block chains. This guide walks you through three moderation automations: auto-timing-out players with high wanted levels, logging kick commands to a mod channel, and responding to Discord’s built-in AutoMod when it catches a rule violation.
All three automations require a connected Discord bot with appropriate permissions (Moderate Members, Manage Messages, Send Messages). Make sure your bot is linked under Settings → Bot before you begin.

Part 1: Auto-timeout high-wanted players

When a player accumulates more than three wanted stars in-game, this automation automatically times them out on Discord for five minutes, giving your moderation team time to respond.
1

Add the ERLC event trigger

Drag an erlc_when_event block onto the canvas and set its EVENT field to player_wanted_level_changed. This block fires every time a player’s wanted level changes in your ERLC server.
2

Read the player ID and wanted stars

Attach two erlc_event_value blocks to read data from the event:
  • First block — set FIELD to PlayerId to get the Roblox user ID.
  • Second block — set FIELD to WantedStars to get the current wanted level (a number from 0–5).
Store both values by wiring them into the inputs of the blocks that follow.
3

Convert Roblox ID to Discord ID

Attach an erlc_roblox_discord_id block and wire the output of your PlayerId erlc_event_value block into its ROBLOX_ID input. This block looks up the linked Discord account for the given Roblox user.
4

Check if wanted stars exceed the threshold

Attach an erlc_compare_values block. Set the comparison operator to > (greater than). Wire:
  • The WantedStars erlc_event_value output into the A input.
  • An erlc_text_value block with value 3 into the B input.
5

Apply the timeout inside a conditional

Attach an erlc_if_else block and connect the comparison block into its CONDITION input. Inside the THEN branch, attach an erlc_bot_timeout block:
  • Wire the output of erlc_roblox_discord_id into the USER_ID input.
  • Set SECONDS to 300 (five minutes).

Part 1 block JSON

Paste this into File → Import Blocks and replace <resource-id> where applicable.
erlc_roblox_discord_id only works if the player has linked their Roblox and Discord accounts through your server’s verification system. If no link exists, the block returns an empty value and the timeout block will skip.

Part 2: Log kick commands to a mod channel

This automation watches for any ERLC command that contains the word “kick” and forwards a summary to your mod-log channel in Discord.
1

Add the command-run trigger

Drag an erlc_when_event block onto the canvas and set EVENT to command_run. This fires whenever any command is executed in your ERLC server.
2

Read the command name

Attach an erlc_event_value block with FIELD set to CommandName. This gives you the name of the command that was run.
3

Check if the command is a kick

Attach an erlc_compare_values block. Set the operator to contains. Wire:
  • The CommandName erlc_event_value output into the A input.
  • An erlc_text_value block with value kick into the B input.
4

Read the target player

Inside the THEN branch of an erlc_if_else block, attach an erlc_event_value block with FIELD set to TargetName (or the relevant field your server emits for the kick target).
5

Send a mod-log message

Attach an erlc_bot_send_message block inside the THEN branch:
  • Set CHANNEL_ID to your mod-log channel ID (<resource-id>).
  • Wire an erlc_join_values chain into MESSAGE to build a string like: "🔨 Kick command run — Target: " + TargetName value.
Add a second erlc_event_value block for ExecutorName and include it in the log message so moderators know who ran the command.

Part 3: Auto-respond to AutoMod actions

Discord’s AutoMod can flag messages automatically, but it won’t DM the offending user. This automation bridges that gap by sending a warning DM whenever AutoMod fires.
1

Add the AutoMod trigger

Drag an erlc_when_discord_event block onto the canvas and set EVENT to discord_automod_action. This fires whenever Discord’s AutoMod takes action on a message in your server.
2

Read the matched keyword and user ID

Attach two erlc_discord_event_value blocks:
  • First block — set FIELD to MatchedKeyword to capture what word triggered AutoMod.
  • Second block — set FIELD to DiscordUserId to identify who sent the message.
3

Send a warning DM

Attach an erlc_bot_dm_user block:
  • Wire the DiscordUserId value into USER_ID.
  • Build a message using erlc_join_values: "⚠️ Your message was flagged by AutoMod for the keyword: " + MatchedKeyword value + ". Please review the server rules."
The discord_automod_action event fires for every AutoMod rule type (keyword filter, spam detection, mention spam, etc.). If you only want to respond to keyword violations, add an erlc_compare_values check on the RuleType field before sending the DM.

Automation summary

Welcome Bot

Greet new members and assign roles automatically.

Event Logging

Post kill logs and join/leave events to Discord channels.