Skip to main content

Discord

This is a shipped config-backed outbound surface. Direct sends are implemented today; native Discord gateway reply-loop ownership is not implemented yet.

At A Glance

FieldValue
Catalog iddiscord
Config keydiscord
Implementation statusconfig_backed
Transportdiscord_http_api
Aliasesdiscord-bot
Default send target kindconversation
Runtime owner todayoutbound-only; no native grouped channels serve discord loop

Minimal Config

[discord]
enabled = true
bot_token_env = "DISCORD_BOT_TOKEN"
Optional multi-account shape:
[discord]
enabled = true
default_account = "ops"

[discord.accounts.ops]
bot_token_env = "DISCORD_OPS_BOT_TOKEN"

[discord.accounts.alerts]
bot_token_env = "DISCORD_ALERTS_BOT_TOKEN"
Optional API override when a controlled environment needs a different API root:
[discord]
enabled = true
bot_token_env = "DISCORD_BOT_TOKEN"
api_base_url = "https://discord.com/api/v10"

Smoke Test

loong channels send discord --target "123456789012345678" --text "hello from loong"
loong channels
loong doctor
What success looks like:
  • channels send discord returns success for a valid channel id target
  • loong channels lists Discord under the config-backed section
  • loong doctor surfaces any token or endpoint problems without pretending a serve runtime exists
  • multi-account configs show which configured account is ready and which one still needs review
  • if application_id or allowed_guild_ids are configured, inspection surfaces keep them visible as reserved future-runtime fields instead of silently discarding them

Command Surface

OperationCommandUsage or status
direct sendchannels send discordUsage: loong channels send discord [OPTIONS] —target <TARGET> —text <TEXT>
gateway reply loopchannels serve discorddiscord serve runtime is not implemented yet

Required Fields For Send

RequirementConfig pathsEnv pointer pathsDefault env
channel enableddiscord.enabled
discord.accounts.<account>.enabled
nonenone
bot tokendiscord.bot_token
discord.accounts.<account>.bot_token
discord.bot_token_env
discord.accounts.<account>.bot_token_env
DISCORD_BOT_TOKEN

Planned Fields Reserved For Future Serve Work

These fields already exist in the channel contract because they belong to the eventual richer Discord runtime story, but they are not enough to claim a shipped serve loop today.
Field familyCurrent role
application_idreserved for future richer Discord runtime / app identity work
allowed_guild_idsreserved for future native inbound or gateway-owned Discord work

Target Rules

  • channels send discord expects a Discord channel/conversation id as the target.
  • Keep targets explicit and numeric.
  • If the target is empty, Loong fails fast instead of attempting an accidental send.

Operator Notes

  • Discord is currently the Discord HTTP API outbound lane, not a gateway-owned bot runtime.
  • If api_base_url is overridden, it must still resolve to http or https; non-HTTP schemes are rejected.
  • Multi-account configs should use default_account plus accounts.<id> before you build higher-level routing on top.
  • loong doctor and onboarding preflight summarize per-account direct-send readiness for configured Discord accounts.
  • application_id and allowed_guild_ids are preserved in status as future-runtime governance fields, not as proof of a shipped channels serve discord loop.
  • Treat loong channels as the inventory surface and loong doctor as the recovery surface.

Gateway And Ownership

This surface is a direct-send delivery lane. It does not join gateway run or the gateway-owned reply-loop contract today.
  • Continue to Channel Guides for the full actionable matrix.
  • Continue to Channels for the conceptual surface model.
  • Continue to Channel Setup for the shared public setup contract.