🦞
Resources

openclaw_channel_discord

Manages the OpenClaw Discord channel.

Manages the Discord channel configuration including bot token, DM policy, message chunking, and action permissions (reactions, threads, pins, search).

Example Usage

resource "openclaw_channel_discord" "main" {
  enabled          = true
  token            = var.discord_bot_token
  dm_policy        = "allowlist"
  allow_from       = ["user123", "user456"]
  text_chunk_limit = 2000
  history_limit    = 30
  reply_to_mode    = "first"

  actions_reactions = true
  actions_messages  = true
  actions_threads   = true
  actions_pins      = false
  actions_search    = true
}

Argument Reference

ArgumentTypeRequiredDefaultDescription
enabledBoolNo--Enable or disable the Discord channel.
tokenStringNo--Discord bot token. Sensitive. Falls back to DISCORD_BOT_TOKEN.
dm_policyStringNo"pairing"DM policy: pairing, allowlist, open, disabled.
allow_fromList(String)No--Allowed Discord user IDs or usernames.
allow_botsBoolNofalseAllow messages from other bots.
media_max_mbInt64No8Max inbound media size in MB.
text_chunk_limitInt64No2000Max characters per outbound message chunk.
chunk_modeStringNo"length"Chunk splitting: length or newline.
history_limitInt64No20Max chat history messages to fetch.
reply_to_modeStringNo"off"Reply-to behavior: off, first, all.
actions_reactionsBoolNo--Enable reaction actions.
actions_messagesBoolNo--Enable message actions (read/send/edit/delete).
actions_threadsBoolNo--Enable thread actions.
actions_pinsBoolNo--Enable pin actions.
actions_searchBoolNo--Enable search actions.

Attribute Reference

AttributeTypeDescription
idStringAlways "channel_discord".

Import

terraform import openclaw_channel_discord.main channel_discord

On this page