major-domo-v2/commands
Cal Corum d295f27afe
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m11s
fix: replace broken @self.tree.interaction_check with MaintenanceAwareTree subclass
The previous code attempted to register a maintenance mode gate via
@self.tree.interaction_check inside setup_hook.  That pattern is invalid
in discord.py — interaction_check is an overridable method on CommandTree,
not a decorator.  The assignment was silently dropped, making maintenance
mode a no-op and producing a RuntimeWarning about an unawaited coroutine.

Changes:
- Add MaintenanceAwareTree(discord.app_commands.CommandTree) that overrides
  interaction_check: blocks non-admins when bot.maintenance_mode is True,
  always passes admins through, no-op when maintenance mode is off
- Pass tree_cls=MaintenanceAwareTree to super().__init__() in SBABot.__init__
- Add self.maintenance_mode: bool = False to SBABot.__init__
- Update /admin-maintenance command to actually toggle bot.maintenance_mode
- Add tests/test_bot_maintenance_tree.py with 8 unit tests covering all
  maintenance mode states, admin pass-through, DM context, and missing attr

Closes #82

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 12:25:01 -05:00
..
admin fix: replace broken @self.tree.interaction_check with MaintenanceAwareTree subclass 2026-03-17 12:25:01 -05:00
custom_commands fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
dev Add dev-only loaded dice command for testing /ab rolls 2026-01-07 22:45:01 -06:00
dice fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
draft fix: batch quick-wins — 4 issues resolved (closes #37, #27, #25, #38) 2026-02-20 11:48:16 -06:00
examples fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
gameplay fix: scorebug stale data, win probability parsing, and read-failure tolerance (closes #39, #40) 2026-02-20 14:14:23 -06:00
help fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
injuries fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
league fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
players Fix /player autocomplete timeout by using current season only 2026-02-05 20:45:09 -06:00
profile fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
soak fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
spoiler Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
teams fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
transactions fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
utilities fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
voice Consolidate season config variables to single source (v2.21.0) 2025-12-02 16:12:16 -06:00
__init__.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
CLAUDE.md CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00