Update: [main] 디스코드 알림 개선 - footer 제거 및 워크북 진행도 표시
All checks were successful
baekjoon-bot-cicd / build_push_deploy (push) Successful in 5m40s
All checks were successful
baekjoon-bot-cicd / build_push_deploy (push) Successful in 5m40s
워크북 모드에서 (k/n) 진행도를 타이틀에 표시하고, 양쪽 모드 모두 하단 정기 알림 footer 제거 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
7
app.py
7
app.py
@@ -86,7 +86,7 @@ async def today(
|
||||
if not wid:
|
||||
return JSONResponse(status_code=400, content={"error": "workbook_id is required for workbook mode"})
|
||||
|
||||
pid, title, level = await pick_from_workbook(db, wid, pick=workbook_pick)
|
||||
pid, title, level, current_idx, total_cnt = await pick_from_workbook(db, wid, pick=workbook_pick)
|
||||
if not pid:
|
||||
return JSONResponse(status_code=409, content={"error": "no_more_problems_in_workbook", "workbook_id": wid})
|
||||
|
||||
@@ -94,9 +94,10 @@ async def today(
|
||||
solved_url = f"https://solved.ac/problems/id/{pid}"
|
||||
level_text = f"Lv. {level}" if level is not None else "Lv. ?"
|
||||
|
||||
progress_text = f"({current_idx}/{total_cnt})" if current_idx and total_cnt else ""
|
||||
discord_payload = {
|
||||
"embeds": [{
|
||||
"title": "🔔 오늘의 백준 추천 문제 (문제집)",
|
||||
"title": f"🔔 오늘의 백준 추천 문제 (문제집) {progress_text}",
|
||||
"description": (
|
||||
f"**{pid}번: {title}**\n"
|
||||
f"난이도: **{level_text}**\n"
|
||||
@@ -106,7 +107,6 @@ async def today(
|
||||
{"name": "문제 링크", "value": f"[바로가기]({problem_url})", "inline": True},
|
||||
{"name": "해설/정보", "value": f"[Solved.ac]({solved_url})", "inline": True},
|
||||
],
|
||||
"footer": {"text": "매일 오전 10시 정기 알림 (n8n)"}
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -155,7 +155,6 @@ async def today(
|
||||
{"name": "문제 링크", "value": f"[바로가기]({problem_url})", "inline": True},
|
||||
{"name": "해설/정보", "value": f"[Solved.ac]({solved_url})", "inline": True},
|
||||
],
|
||||
"footer": {"text": "매일 오전 10시 정기 알림 (n8n)"}
|
||||
}]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user