Skip to main content
Studio provides a complete set of blocks for managing the structure of your Discord server — create and configure text, voice, and category channels; spin up threads and forum posts; generate and revoke invites; and control AutoMod rules, all from inside your automation flows. This page covers every channel, thread, and bot-control block available.

Channel Management

Creating Channels

Use erlc_bot_create_channel to create a new channel of any type in the server. After the block runs, set RESULT_VARIABLE to store the new channel’s ID for use in later blocks.

Deleting and Editing Channels

  • erlc_bot_delete_channel — Permanently delete a channel. Input: CHANNEL_ID
  • erlc_bot_edit_channel — Rename an existing channel. Inputs: CHANNEL_ID, NAME

Channel Settings

Set Category

erlc_bot_set_channel_category — Move a channel into a category.Inputs: CHANNEL_ID, CATEGORY_ID

Set Topic

erlc_bot_set_channel_topic — Set the channel topic displayed below the channel name.Inputs: CHANNEL_ID, CONTENT

NSFW Toggle

erlc_bot_set_channel_nsfw — Mark or unmark a channel as age-restricted.Inputs: CHANNEL_ID; Field: ENABLED (true / false)

Slowmode

erlc_bot_set_channel_slowmode — Set a per-user cooldown between messages (in seconds). Use 0 to disable.Inputs: CHANNEL_ID, SECONDS

Lock Channel

erlc_bot_lock_channel — Lock or unlock a channel, preventing members from sending messages.Inputs: CHANNEL_ID; Field: LOCKED (true / false)

Sync Permissions

erlc_bot_sync_channel_permissions — Sync the channel’s permission overrides to match its parent category.Input: CHANNEL_ID
When locking a channel, pair erlc_bot_lock_channel with erlc_bot_send_message to notify members why the channel is temporarily closed.

Threads and Forum Posts

Creating Threads

Create Thread

erlc_bot_create_thread — Create a public thread in a text channel.Inputs: CHANNEL_ID, NAME; Field: RESULT_VARIABLE

Create Thread (v2)

erlc_bot_create_thread_v2 — Create a thread with explicit type control.Inputs: CHANNEL_ID, NAME; Fields: THREAD_TYPE (11 = public, 12 = private), RESULT_VARIABLE
Use erlc_bot_create_thread_v2 when you need a private thread visible only to explicitly added members.

Forum Posts

erlc_bot_create_forum_post — Create a new post in a forum channel.

Thread Settings

  • erlc_bot_set_thread_archived — Archive or unarchive a thread. Input: THREAD_ID; Field: ARCHIVED (true / false)
  • erlc_bot_set_thread_locked — Lock or unlock a thread. Input: THREAD_ID; Field: LOCKED (true / false)
  • erlc_bot_thread_member — Add or remove a member from a thread. Inputs: MEMBER_ID, THREAD_ID; Field: ADD (true to add, false to remove)

Invites

Creating Invites

erlc_bot_create_invite — Generate an invite link for a channel.

Deleting Invites

erlc_bot_delete_invite — Revoke an existing invite by its code. Input: CODE (the invite code, not the full URL)

AutoMod Rules

AutoMod lets you automatically flag or block messages that match specific keywords or patterns.

Create Rule

erlc_bot_create_automod_rule — Create a new AutoMod rule.Inputs: NAME, KEYWORDS, CONTENT; Field: RESULT_VARIABLE

Delete Rule

erlc_bot_delete_automod_rule — Remove an AutoMod rule.Input: RULE_ID

Rename Rule

erlc_bot_rename_automod_rule — Rename an existing rule.Inputs: RULE_ID, NAME

Enable / Disable Rule

erlc_bot_set_automod_enabled — Enable or disable an AutoMod rule without deleting it.Input: RULE_ID; Field: ENABLED (true / false)

Bot Control

Use these blocks to control the lifecycle of your custom Discord bot from within an automation flow.
Stopping or restarting the bot with erlc_stop_custom_bot or erlc_restart_custom_bot will interrupt any in-progress automations running on that bot. Make sure to use these blocks only at safe points in your flow.

Raw Bot API Requests

For Discord API endpoints that don’t have a dedicated block, use erlc_bot_request to send a raw HTTP request authenticated as your bot.
The ENDPOINT input is relative to the Discord API base URL. You do not need to include https://discord.com/api/v10. Read the Discord developer documentation for available endpoints.

Example: Create a Private Thread and Add a Member

The JSON below creates a private thread in a channel and then adds a specific member to it.
Store the result of erlc_bot_create_thread_v2 in a RESULT_VARIABLE, then reference that variable with an erlc_variable_value block when you need the thread ID in subsequent blocks.

Example: Create a Channel and Set Its Topic