updated tech stack for newer versions of python, removed pyaudio. refactored configuration into .env file and integration inside logic, removed repeat config reads

This commit is contained in:
2025-11-29 18:21:51 +00:00
parent fecb4947e1
commit b3d618b337
8 changed files with 490 additions and 142 deletions

13
main.py
View File

@@ -3,6 +3,16 @@ from bot import Groovy
import config
import help
# Validate configuration before starting
try:
config.validate_config()
config.print_config_info()
except ValueError as e:
print(f"❌ Configuration Error:\n{e}")
print("\n💡 Tip: Copy .env.example to .env and fill in your values")
exit(1)
# Initialize bot with validated config
client = Groovy(command_prefix=config.get_prefix(), intents=discord.Intents.all())
@client.event
@@ -25,4 +35,5 @@ async def on_voice_state_update(member, before, after):
except Exception as e:
print(f"Error auto-disconnecting: {e}")
client.run(config.get_login("live"))
# Run bot with environment-appropriate token
client.run(config.get_discord_token())