Fix await TypeError in do_end_session and show lastError in status summary

This commit is contained in:
MiTHRAL 2026-05-26 17:50:40 -04:00
parent ff11dd7ebd
commit 74f701fb04

View file

@ -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']}`.",