fix: complete migration of daily check-in to discord.Interaction (#19) #69
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#69
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-discord-19"
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
# TODO: complete the migration to an interactioncomment (line 558)greeting =assignment from both branches ofdaily_checkin(5th check-in and 2nd/4th check-in paths)await greeting.edit(...)(ctx-style message pattern) withawait interaction.edit_original_response(...)for consistency with the rest of the functionRoot Cause
The function was mostly migrated to use
discord.Interaction, but retained the oldctx-era pattern of saving the return value of a send/edit call into agreetingvariable and calling.edit()on it. The fully-migrated pattern is to callinteraction.edit_original_response()directly throughout.Files Changed
cogs/economy.py— functional changes todaily_checkinOther Observations
🤖 Generated with Claude Sonnet 4.6
AI Code Review
Files Reviewed
cogs/economy.py(modified — functional changes todaily_checkin, plus ruff cosmetic reformatting throughout)Findings
Correctness
# TODO: complete the migration to an interaction(line ~558 old) — done.greeting =assignment in both branches: the return value ofinteraction.edit_original_response()(discord.InteractionMessage) was only ever used in the oneawait greeting.edit(...)call that followsroll_for_cards.await greeting.edit(content=...)withawait interaction.edit_original_response(content=...)— both target the same message (the deferred original response via the webhook token), but the interaction-based call is the correct discord.py pattern and consistent with every other edit in this function.Edge Cases
if not pack_ids: ... return) still terminates correctly after the edit; the removal of thegreetingvariable has no effect on control flow.Security
Style & Conventions
Suggestions
Verdict: APPROVED
Clean migration. The
greetingvariable was unnecessary once the pattern was fully switched tointeraction.edit_original_response(), and its removal makes the code unambiguously correct. No issues.Automated review by Claude PR Reviewer
4c8fd6f87ftof44ea4452aClosing — will re-implement fresh against
main. Original PR had unrebaseable conflicts from the scouting refactor.Pull request closed