-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart.py
More file actions
executable file
·34 lines (30 loc) · 857 Bytes
/
Copy pathstart.py
File metadata and controls
executable file
·34 lines (30 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
"""
Startup script for the DiscordRPG bot
Handles database initialization and bot startup
"""
import os
import sys
def main():
"""Main startup function"""
print("🎮 DiscordRPG Discord Bot")
print("=" * 30)
# Check for required files
if not os.path.exists('.env'):
print("❌ Error: .env file not found!")
print("Make sure you have a .env file with DISCORD_TOKEN set")
return
# Import and run bot
try:
from bot import DiscordRPGBot
print("🚀 Starting bot...")
bot = DiscordRPGBot()
bot.run()
except KeyboardInterrupt:
print("\n👋 Bot stopped by user")
except Exception as e:
print(f"❌ Error starting bot: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
main()