Added Test Mode
This commit is contained in:
18
.env.testing
Normal file
18
.env.testing
Normal file
@@ -0,0 +1,18 @@
|
||||
# Discord Bot Configuration
|
||||
# Testing environment configuration
|
||||
# This file is used when running: python bot.py testing
|
||||
|
||||
# Your Discord bot token (from Discord Developer Portal) - use a DIFFERENT bot for testing!
|
||||
DISCORD_TOKEN=MTQyNDU3MjA4MjI1MTEwODQyNQ.GJ8iyw.B2O1nlAsw6AlRz3YR5eSN-OcHm4j1l7lEHzxY0
|
||||
|
||||
# The text channel ID to monitor for messages
|
||||
# (Right-click channel with Developer Mode enabled -> Copy ID)
|
||||
# Use a DIFFERENT channel for testing!
|
||||
TEXT_CHANNEL_ID=1424585470616146061
|
||||
|
||||
# Directory containing voice .wav files
|
||||
VOICES_DIR=./voices
|
||||
|
||||
# Default voice name (optional - uses first found voice if not set)
|
||||
# This should match the filename without .wav extension (case-insensitive)
|
||||
# DEFAULT_VOICE=masterchief
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -117,6 +117,7 @@ dmypy.json
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
linux_venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
9
bot.py
9
bot.py
@@ -1,3 +1,12 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Parse command line arguments before loading any config
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "testing":
|
||||
os.environ["ENV_MODE"] = "testing"
|
||||
# Remove the argument so it doesn't interfere with other parsing
|
||||
sys.argv.pop(1)
|
||||
|
||||
import numba_config
|
||||
import asyncio
|
||||
import io
|
||||
|
||||
Reference in New Issue
Block a user