- 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>
* feat(tally): /tally-claim, /tally-transfer, /tally-wipe commands
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(tally): idle sweep, startup load, and empty-VC expiry
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* style(tally): parenthesize voice-state guard for clarity
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(tally): update live tallies when sessions finish
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(tally): robust winner matching + cleanup of deleted-VC tallies
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(tally): /dev-tally to manually attribute a win/loss in your VC
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
guild_squadron is the clean short name from SQUADRONS.json (e.g. DSPLA)
but winning_team_squadron in the replay is the raw tagged value (-DSPLA-).
They never matched for dash/underscore-tagged squads so bar_color was
always not_involved instead of win/loss on the guild's own scoreboard.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Squads with dash or underscore tags (e.g. -DSPLA-, _APS_) had their raw
replay team.squadron value written directly to COMPS filenames, producing
-DSPLA-.json / _APS_.json. The /comp autocomplete returns the clean DB
short_name (DSPLA) so the file lookup never matched.
Fix: strip leading/trailing non-alphanumeric characters and uppercase in
both the writer and the /comp command lookup. Also renamed the 8 existing
decorated COMPS files to their clean equivalents on disk.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same order-inversion bug as build_scoreboard_context existed in
process_session's resolve_clans call. The inverted squadron_long
caused the scoreboard renderer to find the opponent's diff entry
for a dash-tagged squad's players, producing ??? for every player
since their UIDs weren't in the wrong squad's points_diff dict.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When one team has a dash-tag (e.g. -DSPLA-) and the opponent has a normal
tag (e.g. ALUN2), batching both into resolve_clans caused the short-name
pass to place the normal team first in results and the tag pass to append
the dash-tagged team second — inverting the mapping vs. the teams array.
Each team's players were then looked up against the wrong squadron's API,
yielding curr=0 for everyone and diffs=0 on the scoreboard.
Fix: resolve each team concurrently and independently so results are always
index-aligned with the teams list regardless of which resolution path fires.
Also propagates squadron_short to the scoreboard renderer so display names
are clean (DSPLA not -DSPLA-).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR #1223 + fixup moved data_parser into BOTS/SHARED, but five BOT modules
(analytics, autologging, botscript, lux_apis, meta_manager) still used
`from .data_parser import ...`. That relative form looks inside the BOT
package, which no longer contains data_parser, so the bot crashed at
startup with ModuleNotFoundError.
Add BOT/__init__.py to put BOTS/SHARED on sys.path at package import,
then switch all five files to absolute `from data_parser import ...`.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #1223 only staged the deletions of the old paths because the new
top-level directories were still untracked when the commit was authored.
This commit adds the actual restructured tree: SREBOT/ (existing bot),
SHARED/ (vromfs, data_parser, ICONS/MAPS/FONTS, DAGOR_FILES,
update_game_files), and TSSBOT/ (skeleton).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>