# 🐍 SnekBot: Your Instant Chat Companion 🚀 ## 🔥 Create Your Own Bot in 5 Minutes Flat! ### Why SnekBot? - 💨 Lightning-fast setup - 🤖 Fully async and production-ready - 🌈 Super flexible and easy to customize - 🛡️ Handles network issues like a boss ### Prerequisites - Python 3.8+ (because we're modern like that) - A sense of adventure 🏴‍☠️ ### Quick Installation Magic ✨ #### 1. Prep Your Environment ```bash # Ubuntu/Debian users, get ready! sudo apt install python3 python3-venv python3-pip -y # Create your bot's magical realm python3 -m venv venv source venv/bin/activate ``` #### 2. Summon SnekBot ```bash pip install git+https://molodetz.nl/retoor/snekbot.git ``` ### 🤖 Bot Creation Wizard ```python import asyncio from snekbot.bot import Bot class CoolSnekBot(Bot): async def on_join(self, channel_uid): await self.send_message( channel_uid, "Yo! I'm here to make this chat awesome! 🎉" ) async def on_message(self, sender_username, sender_nick, channel_uid, message): message = message.lower() if "hello" in message: await self.send_message(channel_uid, f"Hi there, {sender_nick}! 👋") elif "bye" in message: await self.send_message(channel_uid, f"Catch you later, {sender_nick}! 🤙") # Launch your bot into the wild! bot = CoolSnekBot( url="wss://your-snek-instance.com/rpc.ws", username="your_awesome_bot", password="super_secret_password" ) asyncio.run(bot.run()) ``` ### 🚀 Run Your Bot ```bash python your_awesome_bot.py ``` ### Event Handlers You Can Override - `on_join`: When bot enters a channel - `on_leave`: When bot exits a channel - `on_ping`: Respond to ping messages - `on_mention`: Handle direct mentions - `on_message`: Catch and respond to general messages ### 💡 Pro Tips - Add `logging.basicConfig(level=logging.DEBUG)` for detailed logs - The bot automatically reconnects if connection drops - Customize to your heart's content! ### Contributing Got cool ideas? PRs are welcome! 🤝 ### License MIT - Go wild, have fun! 🎈