chore: add .env.example with placeholder values #135
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#135
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/add-env-example"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
.env.exampledocumenting all environment variables required to run the Discord botBOT_TOKEN,GUILD_ID,SCOREBOARD_CHANNEL,API_TOKEN,DATABASE,LOG_LEVEL,PYTHONHASHSEED,DB_USERNAME,DB_PASSWORD,DB_URL,DB_NAME,RESTART_WEBHOOK_URLContext
The bot relies on several env vars spread across
paperdynasty.py,api_calls.py,in_game/gameplay_models.py,notify_restart.py, and cogs. This file consolidates them so contributors know exactly what to configure without digging through source.References paper-dynasty-database#9
AI Code Review
Files Reviewed
.env.example(added)cogs/economy.py(modified)Findings
Correctness
.env.examplecovers all env vars claimed in the PR body. All values are placeholders — no real credentials..envis already in.gitignore(line 105), so the.env.exampleworkflow is sound.AUTO_OPEN_TYPESfilter in the packs loop correctlycontinues beforep_groupis set, so Check-In Player packs never enterp_data. Thep_countcounter is also unaffected, which is correct.elsebranch added to the pretty_name display loop (pretty_name = key) is a valid defensive fallback for pack types whose group key has a hyphen but contains neither "Team" nor "Cardset". The comment example ("Check-In Player") is slightly misleading because those packs are already filtered out upstream — but the branch itself is not wrong.Security
.env.examplevalues are obvious placeholders. TheRESTART_WEBHOOK_URLplaceholder uses the correct Discord webhook URL structure.Style & Conventions
cogs/economy.pyhas functional pack-filtering changes that are not mentioned in the PR title or body. The title says "chore: add .env.example" but this PR also fixes open-packs menu behavior (filtering auto-open pack types). These changes are correct but belong in a separate PR with a proper description, or the PR title/body should be updated to cover them.# ruff: noqa: F403, F405added at the top ofeconomy.pyis redundant — PR #109 already coverscogs/**for F403/F405 inruff.tomlper-file-ignores. The directive is harmless but unnecessary.AUTO_OPEN_TYPES = {"Check-In Player"}is defined inside the function body. For a set that conceptually describes a configuration policy, a module-level constant would be cleaner and more discoverable, consistent with howSCOUT_TOKEN_COSTis defined inhelpers/scouting.py. Not a blocker.Suggestions
AUTO_OPEN_TYPESto module level.# ruff: noqaline — ruff.toml already handles it.Verdict: COMMENT
The
.env.exampleis clean and correct. The economy.py changes are functionally sound — Check-In Player packs are properly filtered before entering the grouping and display logic. No blocking issues. The main concern is the PR title/body mismatch: a functional fix is buried in a "chore" PR with no description of the code change.Automated review by Claude PR Reviewer
Approved via pd-pr
Approved via pd-pr