fix(wormhole): rename cog class to WormholeV4 to bypass stale registration

Problem: Red's internal state has stale 'Wormhole' cog registrations from
previous versions (both identifier 7730187301 and 928374650), causing
'Cog named Wormhole already loaded' errors even on fresh bot starts.

Root cause: Multiple config identifiers registered under same cog name:
  - wormhole: {'wormhole': {}}  (old lowercase)
  - Wormhole: {'7730187301': {}, '928374650': {}}  (two identifiers!)

Solution: Rename cog class Wormhole → WormholeV4 to bypass all stale
registration state. This gives a clean slate without requiring users to
manually purge config data.

Changes:
- class Wormhole → class WormholeV4 in core.py
- Updated __init__.py import and setup()
- Config identifier unchanged (928374650)

This completely sidesteps the phantom load bug without touching user data.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
root 2026-05-26 16:38:56 +00:00
parent 0c41ae0b9f
commit 6fd48e93af
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
"""Wormhole v4.0.0 — the ultimate cross-server relay cog for Red-DiscordBot."""
from .core import Wormhole
from .core import WormholeV4
__red_end_user_data_statement__ = (
"This cog stores Discord user IDs, guild IDs, and channel IDs for relay functionality. "
@ -10,6 +10,6 @@ __red_end_user_data_statement__ = (
async def setup(bot):
cog = Wormhole(bot)
cog = WormholeV4(bot)
await bot.add_cog(cog)
await cog._init()

View file

@ -94,7 +94,7 @@ log = logging.getLogger("red.evecogs.wormhole")
_AUDIT_LIMIT = 500
class Wormhole(
class WormholeV4(
# Listeners
RelayListener,
SyncListener,