major-domo-v2/commands/soak/__init__.py
Cal Corum 68c30e565b CLAUDE: Implement soak easter egg with disappointment GIFs and tracking
Add comprehensive "soaking" easter egg feature that detects mentions
and responds with GIFs showing escalating disappointment based on
recency (reversed from legacy - more recent = more disappointed).

Features:
- Detects "soak", "soaking", "soaked", "soaker" (case-insensitive)
- 7 disappointment tiers with 5 varied search phrases each
- Giphy API integration with Trump filter and fallback handling
- JSON-based persistence tracking all mentions with history
- /lastsoak command showing detailed information
- 25 comprehensive unit tests (all passing)

Architecture:
- commands/soak/giphy_service.py - Tiered GIF fetching
- commands/soak/tracker.py - JSON persistence with history
- commands/soak/listener.py - Message detection and response
- commands/soak/info.py - /lastsoak info command
- tests/test_commands_soak.py - Full test coverage

Uses existing Giphy API key from legacy implementation.
Zero new dependencies, follows established patterns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 23:25:22 -05:00

54 lines
1.4 KiB
Python

"""
Soak Easter Egg Package
Monitors for "soak" mentions and responds with disappointment GIFs.
The more recently it was mentioned, the more disappointed the response.
"""
import logging
from discord.ext import commands
from .listener import SoakListener
from .info import SoakInfoCommands
logger = logging.getLogger(__name__)
async def setup_soak(bot: commands.Bot):
"""
Setup all soak command modules.
Returns:
tuple: (successful_count, failed_count, failed_modules)
"""
# Define all soak cogs to load
soak_cogs = [
("SoakListener", SoakListener),
("SoakInfoCommands", SoakInfoCommands),
]
successful = 0
failed = 0
failed_modules = []
for cog_name, cog_class in soak_cogs:
try:
await bot.add_cog(cog_class(bot))
logger.info(f"✅ Loaded {cog_name}")
successful += 1
except Exception as e:
logger.error(f"❌ Failed to load {cog_name}: {e}", exc_info=True)
failed += 1
failed_modules.append(cog_name)
# Log summary
if failed == 0:
logger.info(f"🎉 All {successful} soak modules loaded successfully")
else:
logger.warning(f"⚠️ Soak commands loaded with issues: {successful} successful, {failed} failed")
return successful, failed, failed_modules
# Export the setup function and classes for easy importing
__all__ = ['setup_soak', 'SoakListener', 'SoakInfoCommands']