Discord 채널 설정
OpenClaw와 Discord를 연동하여 서버에서 AI 어시스턴트를 사용하는 방법을 안내합니다.
기준일: 2026-06-07
공식 기준: Discord, Configuration — channels
개요
Discord 채널은 다음을 지원합니다:
- 슬래시 커맨드 (
/ask,/help) - 멘션으로 봇 호출 (
@BotName) - 역할 기반 접근 제어
- 스레드 대화
- 음성 채널 텍스트 지원
1단계: Discord 애플리케이션 생성
- Discord Developer Portal 접속
- New Application 클릭
- 앱 이름 입력 후 Create
- Bot 탭 → Add Bot 클릭
- Token 복사 (한 번만 표시됨!)
봇 권한 설정
Bot 탭에서 다음 권한 활성화:
Send MessagesRead Message HistoryUse Slash CommandsEmbed Links
2단계: 서버에 봇 초대
OAuth2 탭 → URL Generator:
- Scopes:
bot,applications.commands - Bot Permissions: 필요한 권한 선택
생성된 URL로 봇을 서버에 초대합니다.
3단계: OpenClaw 설정
{
"channels": {
"discord": {
"enabled": true,
"token": "MTI234567890ABCDEFGHIJKLMNO",
"dmPolicy": "pairing",
"allowFrom": ["1234567890"],
"guilds": {
"123456789012345678": {
"slug": "team-server",
"requireMention": true,
"ignoreOtherMentions": true,
"channels": {
"general": {
"allow": true,
"requireMention": true,
"users": ["987654321098765432"],
"skills": ["docs"]
}
}
}
},
"actions": {
"reactions": true,
"messages": true,
"threads": true,
"pins": true,
"search": true
}
}
}
}
# CLI로 설정
openclaw config set channels.discord.enabled true
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
openclaw config validate
4단계: 연결 확인
# 채널 상태 확인
openclaw channels status --probe
# Discord capability와 로그 확인
openclaw channels capabilities --channel discord --target channel:123456789012345678
openclaw channels logs --channel discord
고급 설정
채널 제한
특정 채널에서만 봇 응답:
{
"channels": {
"discord": {
"guilds": {
"123456789012345678": {
"channels": {
"general": { "allow": true, "requireMention": true },
"private-help": { "allow": true, "users": ["987654321098765432"] }
}
}
}
}
}
}
역할 기반 접근 제어
{
"channels": {
"discord": {
"allowFrom": ["1234567890"],
"guilds": {
"123456789012345678": {
"users": ["987654321098765432"],
"channels": {
"help": {
"allow": true,
"users": ["987654321098765432"]
}
}
}
}
}
}
}
응답 형식 설정
{
"channels": {
"discord": {
"replyToMode": "first",
"suppressEmbeds": true,
"streaming": {
"mode": "progress"
},
"ui": {
"components": {
"accentColor": "#5865F2"
}
}
}
}
}
트러블슈팅
"401 Unauthorized" 오류
봇 토큰을 재발급하고 업데이트:
- Developer Portal → Bot → Reset Token
openclaw config set channels.discord.token "NEW_TOKEN"openclaw gateway restart
메시지가 라우팅되지 않음
openclaw config get channels.discord
openclaw channels status --probe
openclaw channels logs --channel discord
서버 ID는 guilds 아래에, 채널 제한은 guilds.<id>.channels 아래에 둡니다. outbound target은 channel:<id> 또는 user:<id> 형식으로 명시합니다.
참고: