feat(debate): !debate-test 명령어 — 토론 채널 연결 테스트

This commit is contained in:
2026-03-19 21:31:59 +09:00
parent 2350c3c904
commit 834d2c7560

View File

@@ -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