Uploading all files.
This commit is contained in:
37
duckhunt.py
Normal file
37
duckhunt.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/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()
|
||||
Reference in New Issue
Block a user