fix(anime): '새 에피소드 없음'을 오류→성공 처리, 결과 포맷 확대 (120자/줄, 4000자)
This commit is contained in:
@@ -149,12 +149,23 @@ async def handle_anime_message(
|
||||
failures = [r for r in result if not r.success]
|
||||
lines = []
|
||||
for r in result:
|
||||
icon = "✅" if r.success else "❌"
|
||||
if r.success:
|
||||
icon = "✅"
|
||||
else:
|
||||
icon = "❌"
|
||||
name = r.anime.subject if r.anime else "?"
|
||||
lines.append(f"{icon} {name}: {r.message[:60]}")
|
||||
msg = r.message or ""
|
||||
# 제목에서 anime subject 중복 제거
|
||||
if r.anime and msg.startswith(f"{r.anime.subject}: "):
|
||||
msg = msg[len(f"{r.anime.subject}: "):]
|
||||
line = f"{icon} **{name}**: {msg[:120]}"
|
||||
if r.errors:
|
||||
line += f"\n ⚠ {'; '.join(r.errors[:2])}"
|
||||
lines.append(line)
|
||||
desc = "\n".join(lines) if lines else "처리 완료"
|
||||
embed = discord.Embed(
|
||||
title=f"📥 일괄 다운로드 ({len(successes)}/{len(result)}건 성공)",
|
||||
description="\n".join(lines)[:2000] if lines else "처리 완료",
|
||||
description=desc[:4000],
|
||||
color=0x2ECC71 if not failures else 0xF39C12,
|
||||
)
|
||||
await safe_send_embed(message.channel, embed)
|
||||
|
||||
Reference in New Issue
Block a user