The parameter was already ignored (body hardcodes range(1, 19)).
Remove from signature and the one caller that passed it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace custom _make_game/_make_team helpers with existing test
factories for consistency with the rest of the test suite.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Closes#88
Replaced sequential for-loops in get_team_schedule(), get_recent_games(),
and get_upcoming_games() with asyncio.gather() to fire all per-week HTTP
requests concurrently. Also adds import asyncio which was missing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep both the type: ignore annotation and the logger.info call
in admin_maintenance.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>