From 6fd48e93afc1e3080e801f71e61018f4bebd2650 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 26 May 2026 16:38:56 +0000 Subject: [PATCH] fix(wormhole): rename cog class to WormholeV4 to bypass stale registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- wormhole/__init__.py | 4 ++-- wormhole/core.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wormhole/__init__.py b/wormhole/__init__.py index c94ab4e..226e923 100644 --- a/wormhole/__init__.py +++ b/wormhole/__init__.py @@ -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() diff --git a/wormhole/core.py b/wormhole/core.py index 7af227f..f50c139 100644 --- a/wormhole/core.py +++ b/wormhole/core.py @@ -94,7 +94,7 @@ log = logging.getLogger("red.evecogs.wormhole") _AUDIT_LIMIT = 500 -class Wormhole( +class WormholeV4( # Listeners RelayListener, SyncListener,