From 834d2c7560e34fbdf31513a9d380b0072e043d93 Mon Sep 17 00:00:00 2001 From: Variet Agent Date: Thu, 19 Mar 2026 21:31:59 +0900 Subject: [PATCH] =?UTF-8?q?feat(debate):=20!debate-test=20=EB=AA=85?= =?UTF-8?q?=EB=A0=B9=EC=96=B4=20=E2=80=94=20=ED=86=A0=EB=A1=A0=20=EC=B1=84?= =?UTF-8?q?=EB=84=90=20=EC=97=B0=EA=B2=B0=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/discord_bot.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/api/discord_bot.py b/api/discord_bot.py index 4944009..bfba843 100644 --- a/api/discord_bot.py +++ b/api/discord_bot.py @@ -1204,6 +1204,42 @@ async def info_command(ctx: commands.Context): await ctx.send(embed=embed) +# ────────────────────────────────────────────── +# Debate Room — 토론 채널 연동 +# ────────────────────────────────────────────── + +DEBATE_CHANNELS = { + "gemini": 1484156194187771905, + "opus": 1484156521209401476, +} + + +@bot.command(name="debate-test") +async def debate_test(ctx: commands.Context): + """토론 채널 연결 테스트.""" + results = [] + for name, ch_id in DEBATE_CHANNELS.items(): + ch = bot.get_channel(ch_id) + if ch is None: + try: + ch = await bot.fetch_channel(ch_id) + except Exception as e: + results.append(f"❌ {name}: 채널 접근 실패 — {e}") + continue + try: + await ch.send(f"🔗 Debate Room 연결 테스트 — `{name}` 채널 확인") + results.append(f"✅ {name}: 메시지 전송 성공") + except Exception as e: + results.append(f"❌ {name}: 전송 실패 — {e}") + + embed = discord.Embed( + title="🏛️ Debate Channel Test", + description="\n".join(results), + color=0x2ECC71 if all("✅" in r for r in results) else 0xE74C3C, + ) + await ctx.reply(embed=embed) + + async def start_bot(): """Discord Bot 시작.""" token = config.DISCORD_BOT_TOKEN