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> |
||
|---|---|---|
| .. | ||
| commands | ||
| listeners | ||
| models | ||
| services | ||
| ui | ||
| __init__.py | ||
| ARCHITECTURE.md | ||
| core.py | ||
| info.json | ||
| MODULE_MAP.md | ||
| utils.py | ||