feat(wormhole): disable context menus to eliminate load issues

Problem: Context menus persist in Discord's command tree even after bot
shutdown, causing 'already loaded' errors on restart. The idempotent
registration fix helped but added complexity.

Solution: Disable context menus entirely. All functionality remains
available via slash/prefix commands:
  - Report: /wh report message [msg_id] [reason]
  - Bookmark: /wh bookmark save [msg_id]
  - Delete: /wh delete [msg_id] (staff only)
  - Profile: /wh profile [user]

Changes:
- Commented out _register_context_menus() call in _init()
- Kept registration/callback code for future reference
- Simplified cog_unload() - no context menus to remove

Benefits:
- No command tree registration complexity
- Clean reload every time
- No phantom 'already loaded' state
- Simpler cog lifecycle

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
root 2026-05-26 16:35:27 +00:00
parent c8bc14fb42
commit 0c41ae0b9f

View file

@ -157,7 +157,8 @@ class Wormhole(
self._bg_tasks.append(asyncio.create_task(self._scheduled_msg_loop()))
self._bg_tasks.append(asyncio.create_task(self._health_check_loop()))
self._bg_tasks.append(asyncio.create_task(self._poll_expiry_loop()))
self._register_context_menus()
# Context menus disabled - eliminates registration complexity
# self._register_context_menus()
self._ready.set()
log.info("Wormhole v%s ready — %d networks loaded", self.__version__, len(nets))