feat(tally): fix live VC status updates and add permission pre-flight check
- Move tally hook from process_session (per-guild, gated by Logs subs) to process_ws_replays (once per game, all guilds) via on_game_finished - Add set_voice_channel_status permission check at /tally-claim time so failures are immediate and visible rather than silent on every game - Remove entitlement gate from tally_claim and tally_transfer - Add VC tally permission section to /diagnose-perms when run in a VC - Add 5 new locale keys to en.json for the permission messages Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -266,6 +266,14 @@ async def on_session_processed(guild_id: int, teams: list[dict],
|
||||
logging.error(f"[TALLY] on_session_processed error (guild={guild_id}): {e}")
|
||||
|
||||
|
||||
async def on_game_finished(teams: list[dict], winner_short: Optional[str],
|
||||
is_draw: bool, session_id: str) -> None:
|
||||
"""Update all active tallies across every guild for one finished session."""
|
||||
guild_ids = {gid for (gid, _) in _REGISTRY}
|
||||
for guild_id in guild_ids:
|
||||
await on_session_processed(guild_id, teams, winner_short, is_draw, session_id)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Idle sweep
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user