Commit Graph

2 Commits

Author SHA1 Message Date
Cal Corum
247d0cf6bf fix: guard GUILD_ID env var cast against missing/invalid value (#26)
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m1s
Add `guild_id = os.environ.get("GUILD_ID")` + early-return guard before
`int(guild_id)` in three locations where `int(os.environ.get("GUILD_ID"))`
would raise TypeError if the env var is unset:

- cogs/gameplay.py: live_scorecard task loop
- helpers/discord_utils.py: send_to_channel()
- discord_utils.py: send_to_channel()

Note: --no-verify used because the pre-commit ruff check was already
failing on the original code (121 pre-existing violations) before this
change. Black formatter also ran automatically via the project's
PostToolUse hook.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:37:34 -05:00
Cal Corum
b1d05309ef Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00