Files
duckhunt/duckhunt.py
2025-09-12 18:22:14 +01:00

38 lines
794 B
Python

#!/usr/bin/env python3
"""
Main entry point for DuckHunt Bot
"""
import asyncio
import json
import sys
import os
# Add src directory to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from src.duckhuntbot import IRCBot
def main():
try:
with open('config.json') as f:
config = json.load(f)
bot = IRCBot(config)
bot.logger.info("🦆 Starting DuckHunt Bot...")
# Run the bot
asyncio.run(bot.run())
except KeyboardInterrupt:
print("\n🛑 Bot stopped by user")
except FileNotFoundError:
print("❌ config.json not found!")
sys.exit(1)
except Exception as e:
print(f"❌ Error: {e}")
sys.exit(1)
if __name__ == '__main__':
main()