#!/usr/bin/env python3
import os
import sys

# Print environment variables
print("=== Environment Variables ===")
for key in os.environ:
    if "GROUP_HORSE_RACING" in key:
        print(f"{key}={os.environ[key]}")

print("\n=== Loading Config ===")
from danding_bot.plugins.group_horse_racing.config import Config

config = Config()
print(f"TEST_MODE: {config.TEST_MODE} (type: {type(config.TEST_MODE).__name__})")
print(f"TESTERS: {config.TESTERS} (type: {type(config.TESTERS).__name__})")
print(f"TEST_GROUPS: {config.TEST_GROUPS} (type: {type(config.TEST_GROUPS).__name__})")
print(f"ALLOWED_GROUPS: {config.ALLOWED_GROUPS} (type: {type(config.ALLOWED_GROUPS).__name__})")

print("\n=== Testing Permission Check ===")
test_user_id = 1424473282
print(f"Test user_id: {test_user_id}")
print(f"Is in TESTERS: {test_user_id in config.TESTERS}")
print(f"TEST_MODE enabled: {config.TEST_MODE}")
print(f"Should have access: {config.TEST_MODE and test_user_id in config.TESTERS}")
