/serverinfo and instantly see live player counts, join keys, and server names — all powered by erlc.dev Studio automations running behind the scenes.
Slash commands must be registered in the Discord Developer Portal or through the Studio bot setup page before they can trigger automations. Go to Settings → Bot → Slash Commands in Studio to register your commands, or add them manually in the Discord Developer Portal.
Part 1: /serverinfo — live server stats
This command lets anyone in your Discord server query live ERLC data on demand: the server name, current and max player counts, and the join key.
1
Add the slash command trigger
Drag an
erlc_when_slash_command block onto the canvas. Set its COMMAND field to serverinfo. This block fires whenever a Discord member runs /serverinfo in any channel your bot can see.2
Read server data
Attach four
erlc_server_value blocks in sequence to read the fields you need:Name— the ERLC server name.CurrentPlayers— how many players are online right now.MaxPlayers— the server’s player cap.JoinKey— the private code players need to join.
erlc_join_values chain in the next step.3
Build the response string
Use nested Each
erlc_join_values blocks to concatenate all the data into a single readable message. A clear format looks like:erlc_join_values block joins exactly two values (A and B), so nest them to chain more than two pieces of text together.4
Reply to the interaction
Attach an
erlc_bot_interaction_reply block and wire your completed erlc_join_values chain into its MESSAGE input. This sends the response as a reply to the slash command interaction, visible only to the invoker by default./serverinfo block JSON
Paste this into File → Import Blocks to load the complete automation.
Part 2: /kick — permission-gated moderation command
This command lets staff members kick a Discord user directly from a slash command, with a built-in permission check to prevent abuse.
1
Add the slash command trigger
Drag an
erlc_when_slash_command block onto the canvas and set COMMAND to kick. Connect a user argument option in the OPTIONS slot so Discord prompts the invoker to select a target member.2
Check invoker permissions
Attach an
erlc_discord_member_has_permission block. Set the PERMISSION field to either kick_members or administrator. This block returns true if the member who ran the command holds that permission in your server.3
Branch on the permission result
Attach an
erlc_if_else block and wire the erlc_discord_member_has_permission output into its CONDITION input.THEN branch (has permission):- Attach an
erlc_bot_kickblock. Wire the target member’s ID from the slash command option into the USER_ID input. - Attach an
erlc_bot_interaction_replyblock with a confirmation message, e.g."✅ Member has been kicked.".
- Attach an
erlc_bot_interaction_replyblock with a denial message, e.g."🚫 You don't have permission to use this command.".
Slash command overview
Welcome Bot
Greet new members and assign roles automatically on join.
Moderation Automation
Auto-timeout high-wanted players and log mod actions.