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>
15 lines
517 B
Python
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()
|