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>
This commit is contained in:
@@ -217,28 +217,6 @@ def wipe(guild_id: int, channel_id: int) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
def apply_manual_result(guild_id: int, channel_id: int, kind: str,
|
||||
opponent: str = "DEV") -> Optional["Tally"]:
|
||||
"""Manually bump a VC's active tally by a win or loss (dev/testing).
|
||||
|
||||
``kind`` is "win" or "loss". Mirrors what a finished game would do but with
|
||||
no real opponent, so ``last_opponent`` is set to a fixed label. Returns the
|
||||
updated tally, or None if the VC has no active tally.
|
||||
"""
|
||||
tly = _REGISTRY.get((guild_id, channel_id))
|
||||
if tly is None:
|
||||
return None
|
||||
if kind == "win":
|
||||
tly.wins += 1
|
||||
else:
|
||||
tly.losses += 1
|
||||
tly.last_result_kind = kind
|
||||
tly.last_opponent = opponent
|
||||
tly.last_update_ts = time.time()
|
||||
_save()
|
||||
return tly
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Voice-status HTTP helper
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user