EveCogs/wormhole
root c8bc14fb42 fix(wormhole): make context menu registration idempotent
Problem: If bot crashes or shuts down ungracefully, context menus stay
registered in Discord's command tree. On restart, add_command() fails
with 'already loaded' error.

Solution: Remove existing context menus before registering new ones.
This makes registration idempotent (safe to run multiple times).

Changes:
- _register_context_menus() now removes existing menus first
- Wrapped in try/except to handle 'not found' gracefully
- Ensures clean reload even after ungraceful shutdown

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-05-26 16:33:09 +00:00
..
commands fix: wire up missing feature enforcement in relay 2026-05-14 19:33:58 +00:00
listeners fix: wire up missing feature enforcement in relay 2026-05-14 19:33:58 +00:00
models refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff 2026-05-14 19:07:49 +00:00
services refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff 2026-05-14 19:07:49 +00:00
ui refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff 2026-05-14 19:07:49 +00:00
__init__.py refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff 2026-05-14 19:07:49 +00:00
ARCHITECTURE.md fix(wormhole): fix persistence bug and finalize v4.0.0 modular architecture 2026-05-26 16:26:03 +00:00
core.py fix(wormhole): make context menu registration idempotent 2026-05-26 16:33:09 +00:00
info.json refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff 2026-05-14 19:07:49 +00:00
MODULE_MAP.md fix(wormhole): fix persistence bug and finalize v4.0.0 modular architecture 2026-05-26 16:26:03 +00:00
utils.py feat: per-network mention config + user opt-in/out for pings 2026-05-12 15:49:56 +00:00