Skip to content

🐛 Fix interaction failures stemming from bot reset / state loss#175

Open
0xRy4n wants to merge 2 commits intomainfrom
bugfix/interaction-fail
Open

🐛 Fix interaction failures stemming from bot reset / state loss#175
0xRy4n wants to merge 2 commits intomainfrom
bugfix/interaction-fail

Conversation

@0xRy4n
Copy link
Member

@0xRy4n 0xRy4n commented Mar 20, 2026

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply.

  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality not to work as expected).
  • Documentation Update (if none of the other choices applies).

Proposed changes

View interactions would fail if the bot had been reset or lost connection causing some staff actions to result in "This interaction failed" when clicking on buttons in views.

  • BanDecisionView buttons now use specific custom IDs instead of static ones
  • BanDecisionView constructor only takes ban ID and reconstructs additional context at call time
  • Callbacks use defer() before continuing processing
  • View registration

Checklist

Put an x in the boxes that apply.

  • I have read and followed the CONTRIBUTING.md
    doc.
  • Lint and unit tests pass locally with my changes.
  • I have added the necessary documentation (if appropriate).

Additional context

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 80.39216% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.72%. Comparing base (131c32b) to head (1e89675).

Files with missing lines Patch % Lines
src/bot.py 15.78% 16 Missing ⚠️
src/helpers/ban.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   59.38%   61.72%   +2.33%     
==========================================
  Files          50       50              
  Lines        2903     2939      +36     
==========================================
+ Hits         1724     1814      +90     
+ Misses       1179     1125      -54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant