Simplified DuckHunt bot with customizable messages and colors

This commit is contained in:
2025-09-23 02:57:28 +01:00
parent 9285b1b29d
commit de64756b6d
19 changed files with 797 additions and 5712 deletions

View File

@@ -1,5 +1,6 @@
"""
DuckHunt IRC Bot - Main Entry Point
DuckHunt IRC Bot - Simplified Entry Point
Commands: !bang, !reload, !shop, !rearm, !disarm
"""
import asyncio
@@ -15,23 +16,31 @@ from src.duckhuntbot import DuckHuntBot
def main():
"""Main entry point for DuckHunt Bot"""
try:
with open('config.json') as f:
config_file = 'config.json'
if not os.path.exists(config_file):
print("❌ config.json not found!")
sys.exit(1)
with open(config_file) as f:
config = json.load(f)
bot = DuckHuntBot(config)
bot.logger.info("🦆 Starting DuckHunt Bot...")
# Run the bot
asyncio.run(bot.run())
except KeyboardInterrupt:
print("\n🛑 Bot stopped by user")
print("\n🛑 Shutdown interrupted by user")
except FileNotFoundError:
print("❌ config.json not found!")
sys.exit(1)
except Exception as e:
print(f"❌ Error: {e}")
sys.exit(1)
else:
print("👋 DuckHunt Bot stopped gracefully")
if __name__ == '__main__':
main()
main()