feat(debate): v2 구현 — 자동 루프, 파일 기반 I/O, Flash 합의 판정, !debate-status

This commit is contained in:
2026-03-20 06:19:46 +09:00
parent 0508d7be8c
commit 2c3998a036
3 changed files with 376 additions and 212 deletions

View File

@@ -1260,18 +1260,30 @@ async def debate_stop(ctx: commands.Context):
await _debate_handler.stop(ctx)
@bot.command(name="debate-next")
async def debate_next(ctx: commands.Context):
"""다음 턴 진행."""
if not _debate_handler.session.active:
@bot.command(name="debate-status")
async def debate_status(ctx: commands.Context):
"""토론 진행 상태 확인."""
s = _debate_handler.session
if not s.active:
await ctx.reply("진행 중인 토론이 없습니다.")
return
await _debate_handler._next_turn()
status = "⏸️ 사용자 응답 대기" if s.paused else "▶️ 자동 진행 중"
embed = discord.Embed(
title="🏛️ Debate Status",
description=(
f"**주제**: {s.topic}\n"
f"**라운드**: {s.round}/{s.max_rounds}\n"
f"**상태**: {status}\n"
f"**현재 발언자**: {s.current_speaker or '-'}"
),
color=0x9B59B6,
)
await ctx.reply(embed=embed)
@bot.command(name="debate-inject")
async def debate_inject(ctx: commands.Context, *, opinion: str = ""):
"""사용자 의견 삽입 후 다음 턴. 사용법: !debate-inject 의견"""
"""사용자 의견 삽입. 사용법: !debate-inject 의견"""
if not opinion:
await ctx.reply("⚠️ 의견을 입력하세요: `!debate-inject 의견`")
return