-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
29 lines (22 loc) · 1.13 KB
/
config.py
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
# config.py
import os
from dotenv import load_dotenv
# Load environment variables from a .env file if present
load_dotenv()
class Config:
"""
Configuration class that holds all the necessary settings for the application.
It fetches values from environment variables with default fallbacks.
"""
# Discord Bot Token (replace with your actual token in production)
DISCORD_TOKEN = os.getenv('DISCORD_TOKEN')
# Discord Channel IDs for default and error messages
DEFAULT_DISCORD_CHANNEL_ID = int(os.getenv('DISCORD_CHANNEL_ID', 1284897403706806423))
ERROR_DISCORD_CHANNEL_ID = int(os.getenv('ERROR_DISCORD_CHANNEL_ID', 1284897403706806423))
# GitHub Webhook Secret for verifying incoming requests
GITHUB_WEBHOOK_SECRET = os.getenv('GITHUB_WEBHOOK_SECRET')
# Additional Configuration Flags
SEND_UNEXPECTED_EVENTS = os.getenv('SEND_UNEXPECTED_EVENTS', 'False').lower() in ['true', '1', 'yes']
INCLUDE_HANDLER_INFO = os.getenv('INCLUDE_HANDLER_INFO', 'False').lower() in ['true', '1', 'yes']
# File path for data persistence
DATA_STORE_FILE = os.getenv('DATA_STORE_FILE', "data_store.json")