From 74f701fb0474b18982f75f71063083f029e96024 Mon Sep 17 00:00:00 2001 From: MiTHRAL Date: Tue, 26 May 2026 17:50:40 -0400 Subject: [PATCH] Fix await TypeError in do_end_session and show lastError in status summary --- archive_bot/discord_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archive_bot/discord_api.py b/archive_bot/discord_api.py index 0aa16a4..1ad358a 100644 --- a/archive_bot/discord_api.py +++ b/archive_bot/discord_api.py @@ -50,6 +50,9 @@ def format_watch_party_summary(payload: dict[str, Any]) -> str: f"Status: `{session.get('status', 'unknown')}`", f"Worker: `{worker.get('workerStatus', 'idle')}` ยท Playback: `{worker.get('playbackState', 'idle')}`", ] + last_error = str(worker.get("lastError", "") or "").strip() + if last_error: + lines.append(f"Error: `{last_error}`") current_title = str(worker.get("currentTitle", "") or "").strip() if current_title: lines.append(f"Now playing: `{current_title}`") @@ -387,7 +390,7 @@ class DiscordGatewayManager: async def do_end_session(interaction: Any) -> None: session = ensure_session(interaction, create_if_missing=False) - await end_watch_party_session(int(session["id"])) + end_watch_party_session(int(session["id"])) await respond( interaction, f"Ended the watch-party session `{session['title']}`.",