Skip to content

Instantly share code, notes, and snippets.

View dcsportsfan23's full-sized avatar

dcsportsfan23

  • Joined May 11, 2026
View GitHub Profile
@dcsportsfan23
dcsportsfan23 / bet_diag3.py
Created June 8, 2026 01:22
bet-bot diag v3 - parser miss investigation
"""Diagnostic v3: figure out why touch23's 6/2 #bets message was not parsed.
Specifically: did the bot see ANY June messages from touch23 in #bets?
And what does the bot think the #bets channel ID is?
"""
import sqlite3, os, sys, datetime, json
DB = '/data/bets.sqlite3'
con = sqlite3.connect(DB)
con.row_factory = sqlite3.Row
@dcsportsfan23
dcsportsfan23 / bet_diag2.py
Created June 7, 2026 10:18
bet-bot diag v2
"""Diagnostic v2: show what the bot's nightly job has done since 5/11."""
import sqlite3, os, sys, datetime
DB = '/data/bets.sqlite3'
if not os.path.exists(DB):
print(f"FATAL: {DB} missing"); sys.exit(1)
con = sqlite3.connect(DB)
con.row_factory = sqlite3.Row
c = con.cursor()
@dcsportsfan23
dcsportsfan23 / bet_cleanup.py
Created June 6, 2026 23:27
bet-bot one-shot cleanup: clear bogus corrected=Y on pending rows
"""
Bet bot one-shot cleanup: clear bogus corrected='Y' on rows still result='pending'.
Background: auto_resolve_pending_bets() skips rows with corrected='Y'.
On 5/11 the recovery scripts set corrected='Y' on rows that were still pending,
which permanently blocks them from auto-resolving.
This script:
1. Shows the affected rows BEFORE the change
2. Clears corrected from 'Y' to '' on rows where result='pending'
@dcsportsfan23
dcsportsfan23 / bet_diag.py
Last active June 6, 2026 23:15
bet-bot live DB diagnostic
"""
Bet bot live DB diagnostic — read-only.
Prints state of /data/bets.sqlite3 so we can plan the resettle + bot fix.
"""
import sqlite3, os, sys, datetime
DB = '/data/bets.sqlite3'
print("=" * 60)
print("BET BOT LIVE DB DIAGNOSTIC")