28 Commits

Author SHA1 Message Date
deploy c0214eaaae fix(recap): speed up /card lookup, fix stale completed-season cache, add Place Finished
- /card player lookup was a leading-wildcard substring match with a Python
  ulower() UDF over 6.16M player_games_hist rows — a full scan measured at
  27s live before the ~2s render. Add a prefix fast-path
  (nick LIKE 'name%' COLLATE NOCASE) that uses the existing NOCASE index
  (~1ms), falling back to the ulower substring scan only when the prefix
  finds nothing. Same fix applied to _resolve_player_uids_batch (compare/stats).
  Lookup: 27,205ms -> 1ms.

- Completed-season recap cache served ANY cached PNG forever, including files
  rendered mid-season (frozen at whatever point they were last viewed). Only
  serve from cache when the file's mtime is after season end; otherwise
  re-render. Fixed in both BOT/utils.py and web/server.js (shared cache).

- Replace squadron card "Rating change" with "Place finished" (#rank / total),
  derived by ranking clans by final total_score among those active in-season.

- Add (CARD)/(RECAP) timing logs for prod observability.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 19:20:26 +00:00
deploy 28a635438d 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>
2026-06-20 08:02:53 +00:00
NotSoToothless 25990c361f docs(tally): add tally to /help + website docs; translate to all locales (#1342)
- Add a 'Voice channel tally' group to /help with the three commands.
- Add a Voice Channel Tally section to the website docs (docs.ejs).
- Translate the commands.tally bot strings + help_group_tally into all 10
  other bot locales, and the new docs.* web strings into all 10 web locales.
- Fix stale need_one_input string (ign/squadron_short -> username/squadron).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 01:56:32 -07:00
NotSoToothless 3590b1f42f Auto merge dev → main (#1341)
* chore(tally): remove /dev-tally testing command

Feature is verified working; drop the dev-only manual win/loss command and its now-unused apply_manual_result helper and test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* refactor(tally): rename /tally-wipe to /tally-clear

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 01:33:29 -07:00
NotSoToothless db7c546a24 feat(tally): friendlier option labels + dev-tally only counts matching target (#1340)
Rename /tally-claim and /tally-transfer options to username/squadron with
clearer descriptions. Fix /dev-tally to only apply a win/loss when the
passed username/squadron actually matches what the VC is tracking, instead
of bumping any active tally.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 01:27:08 -07:00
NotSoToothless 9222f7c53f Auto merge dev → main (#1339)
* 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>
2026-06-19 01:19:19 -07:00
deploy de42c30bab timeline feaky 2026-06-04 23:35:09 +00:00
NotSoToothless cb0a18f748 move venv to shared (#1291) 2026-05-31 01:43:19 -07:00
NotSoToothless 37c3e66d75 update blacklists (#1290) 2026-05-30 10:23:03 -07:00
NotSoToothless db34ca0d3d update helps and commands (#1288) 2026-05-30 09:09:29 -07:00
NotSoToothless 54c06bd275 lets get this party starteddddd (#1287) 2026-05-30 08:45:32 -07:00
deploy 0154c41997 fix: strip tag decorators from squadron names in comp writer and /comp lookup
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>
2026-05-29 18:15:48 +00:00
NotSoToothless cc4bc14193 fix schedule (#1286) 2026-05-29 09:45:37 -07:00
NotSoToothless 4984ba4f6c fix schedule (#1280) 2026-05-27 07:22:53 -07:00
NotSoToothless 45b1b334c4 update bumass command, and bad wording (#1279) 2026-05-27 07:08:28 -07:00
NotSoToothless 9c6ca3bcd7 compress the mf (#1267) 2026-05-24 19:44:12 -07:00
NotSoToothless cd909bc858 add leave option and wire up (#1264) 2026-05-19 22:24:03 -07:00
NotSoToothless 47ae8b92f7 Auto merge dev → main (#1258)
* meow

* updated it

* meow

* add avg TTL footer to /comp + extend freshness window to 90m when servers slow

---------

Co-authored-by: Clippii <clippii@protonmail.com>
2026-05-17 12:58:48 -07:00
Clippii d316d8fd61 added feat 2026-05-17 12:11:11 +01:00
NotSoToothless ff379c7843 move some commands to standard (#1256) 2026-05-16 16:04:37 -07:00
NotSoToothless 55ab213e76 limit by UID and server (#1252) 2026-05-15 03:05:48 -07:00
NotSoToothless 311ae875fb limit by UID and server (#1251) 2026-05-15 02:56:55 -07:00
NotSoToothless 0c3fc27832 mrrrp (#1250) 2026-05-15 02:27:26 -07:00
NotSoToothless de78c90033 fix weekly br selector (#1249) 2026-05-15 02:23:30 -07:00
NotSoToothless 6303285425 fix weekly BR dedup + add /resend-weekly-br dev command
Per-squadron WeeklyBR reports are distinct from the global wildcard
report and should always send even when both point at the same channel.
Removed the dedup block that was silently dropping squadron-specific
embeds whenever the channel matched the wildcard channel.

Adds /resend-weekly-br (dev-only) to force-resend the most recently
ended BR window to all configured channels, clearing the idempotency
marker first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 09:19:33 +00:00
NotSoToothless 39c42ab635 remove old links (#1243) 2026-05-14 16:17:30 -07:00
NotSoToothless ff420e131f fix relative .data_parser imports in BOT/* after SHARED move (#1224)
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>
2026-05-13 23:30:15 -07:00
FURRO404 2b399fdb81 add SREBOT, SHARED, TSSBOT contents (fixup for #1223)
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>
2026-05-13 23:17:02 -07:00