CALORIE SYSTEM

This commit is contained in:
2026-02-09 17:26:00 -06:00
parent e94a42c6dc
commit b4ff9710a8
4 changed files with 45 additions and 9 deletions

9
db.py
View File

@@ -22,10 +22,19 @@ def init_db():
rr INT DEFAULT 0,
kills INT DEFAULT 0,
deaths INT DEFAULT 0,
calories_burned DECIMAL(10, 2) DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
""")
# Add calories_burned column if it doesn't exist
try:
cur.execute("""
ALTER TABLE users ADD COLUMN calories_burned DECIMAL(10, 2) DEFAULT 0
""")
except:
pass # Column already exists
cur.execute("""
CREATE TABLE IF NOT EXISTS workouts (
discord_id VARCHAR(32),