Discord Activities
기준일: 2026-07-26
공식 기준: Discord Activities
Discord Activities 문서는 OpenClaw 공식 문서(channels/discord-activities)를 한국어로 정리한 가이드입니다. Launch self-contained OpenClaw HTML widgets inside Discord Activities 명령·설정 키·코드 예시는 공식 문서를 그대로 보존하며, 해석과 절차 안내는 한국어로 제공합니다. 최종 동작은 설치된 CLI 버전과 공식 원문을 확인하세요.
핵심 요약
Launch self-contained OpenClaw HTML widgets inside Discord Activities
한국어 가이드 범위: channels/discord-activities 경로의 설정·명령·제약·예시를 학습용으로 재구성합니다.
문서 구성
공식 문서의 주요 섹션은 다음과 같습니다.
- 사전 요구사항
- ~/.cloudflared/config.yml
- 설정
- Security model
- 트러블슈팅
- The Activity says “Gateway offline”
- Discord opens a blank page or reports blocked:csp
- “Widget unavailable”
- “You cannot launch Activities in this channel”
상세 내용
본문
Discord Activities let an agent post an interactive, self-contained HTML widget to the current Discord channel. The message includes an Open widget button; clicking it launches the widget inside Discord.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
사전 요구사항
Any HTTPS reverse proxy or tunnel works. A named Cloudflare Tunnel provides a stable hostname without exposing the gateway port directly.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- an existing OpenClaw Discord bot
- a public HTTPS hostname that reaches the OpenClaw gateway
- permission to configure Activities and OAuth2 for the bot's Discord application
~/.cloudflared/config.yml
tunnel: openclaw-discord credentials-file: /home/you/.cloudflared/TUNNEL-ID.json ingress:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- hostname: openclaw.example.com
- service: http_status:404
설정
Start your tunnel or reverse proxy and verify that https://openclaw.example.com/discord/activity/ reaches the gateway after Activities configuration is added. Replace the example hostname with your own.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- prefix:
ROOT(/) - target:
openclaw.example.com/discord/activity
{
channels: {
discord: {
token: "${DISCORD_BOT_TOKEN}",
activities: {
clientSecret: "${DISCORD_CLIENT_SECRET}",
// Optional. Defaults to the bot application ID learned at startup.
applicationId: "YOUR_DISCORD_APPLICATION_ID",
},
},
},
}
Security model
The public Activity shell and token-exchange route become reachable through your tunnel when enabled. They do not expose widget HTML without a valid OAuth session and one-time document capability.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- OAuth identifies the Discord user before widget metadata is returned.
- Discord's Get Activity Instance API must confirm that the OAuth user is present in the current Activity instance. The instance channel must match the channel where the widget was posted.
- Everyone who Discord permits into that channel can open its widgets. To narrow the audience, use Discord channel permissions. OpenClaw command and DM allowlists do not grant or remove access to already-posted channel content.
- OAuth sessions expire after 15 minutes. Widget document capabilities expire after 60 seconds and work once.
- Widgets expire after seven days, with at most 64 retained per Discord plugin instance.
- Widget HTML is authored by your agent and should be treated as trusted content. Do not embed secrets you would not want a buggy widget to expose.
- The widget can navigate within its own nested frame. The
sandbox="allow-scripts"iframe blocks top-level navigation, popups, and same-origin access, while its Content Security Policy blocks network connections and external resources. These controls are defense-in-depth, not a security boundary against the agent that authored the widget. - When Activities is disabled,
/discord/activityis not registered at all.
트러블슈팅
이 섹션의 세부 항목은 공식 문서 트러블슈팅를 참고하세요.
The Activity says “Gateway offline”
주요 항목:
- confirm the tunnel is running and routes to the gateway's actual bind port
- confirm the Developer Portal target includes
/discord/activity - restart the gateway after changing Discord or OpenClaw configuration
- check gateway logs for the one-line warning about a missing Activities client secret
Discord opens a blank page or reports blocked:csp
Widget network requests are intentionally blocked. Inline all CSS, JavaScript, images, and data needed by the widget.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- verify the URL mapping uses
ROOTand does not add a second/discord/activitysegment - confirm the shell,
shell.js, and SDK module all return through the Discord proxy - inspect gateway logs for requests under
/discord/activity/
“Widget unavailable”
Launch the button from the channel where the agent posted it. OpenClaw tracks launches server-side when clicked, so a fresh launch record can resolve the exact widget even when Discord omits or mangles the button's custom ID. When neither the custom ID nor a launch record resolves, OpenClaw opens the most recently posted live widget in that channel. Older widgets remain addressable through buttons that preserve their custom ID.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
“You cannot launch Activities in this channel”
Discord does not launch Activities from forum-post threads. OpenClaw can post the widget message and button there, but launch the Activity from a regular text channel instead. This restriction comes from Discord, not OpenClaw.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
실습 체크리스트
- 공식 문서와 로컬 버전을 대조합니다:
https://docs.openclaw.ai/channels/discord-activities - 관련 CLI는
openclaw --help및 하위 명령--help로 옵션을 확인합니다. - 설정 변경 시
openclaw config/openclaw doctor로 유효성을 검사합니다. - Gateway·채널·플러그인 변경 후에는 필요 시 Gateway를 재시작합니다.
자주 쓰는 명령·설정 예시
# ~/.cloudflared/config.yml
tunnel: openclaw-discord
credentials-file: /home/you/.cloudflared/TUNNEL-ID.json
ingress:
- hostname: openclaw.example.com
service: http://127.0.0.1:18789
- service: http_status:404
cloudflared tunnel login
cloudflared tunnel create openclaw-discord
cloudflared tunnel route dns openclaw-discord openclaw.example.com
cloudflared tunnel run openclaw-discord
{
channels: {
discord: {
token: "${DISCORD_BOT_TOKEN}",
activities: {
clientSecret: "${DISCORD_CLIENT_SECRET}",
// Optional. Defaults to the bot application ID learned at startup.
applicationId: "YOUR_DISCORD_APPLICATION_ID",
},
},
},
}
관련 링크
이 가이드는 공식 문서를 한국어 학습용으로 재구성한 것입니다. 옵션 기본값·플래그 이름은 설치 버전에 따라 달라질 수 있습니다.