EveCogs/wormhole/__init__.py
root 6fd48e93af 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>
2026-05-26 16:38:56 +00:00

15 lines
517 B
Python

"""Wormhole v4.0.0 — the ultimate cross-server relay cog for Red-DiscordBot."""
from .core import WormholeV4
__red_end_user_data_statement__ = (
"This cog stores Discord user IDs, guild IDs, and channel IDs for relay functionality. "
"Per-user data includes message counts, karma scores, keyword highlights, and DM relay subscriptions. "
"Users may request deletion of their data via the bot owner."
)
async def setup(bot):
cog = WormholeV4(bot)
await bot.add_cog(cog)
await cog._init()