Configure new Telegram bot token across frontend Admin dashboard and Python bot service
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"community_bot_token": "",
|
||||
"telegram_bot_token": "",
|
||||
"community_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||
"telegram_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||
"helper_chat_ids": [971749136, 5567776672, 1873240361],
|
||||
"spring_backend_url": "http://localhost:8085"
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ CONFIG_PATH = os.path.join(os.path.dirname(__file__), "config.json")
|
||||
def load_config():
|
||||
if not os.path.exists(CONFIG_PATH):
|
||||
default_config = {
|
||||
"community_bot_token": "8859374355:AAH0dhwstkTBhRerRTjzmb2RG2fjPbigzvo",
|
||||
"telegram_bot_token": "8913773505:AAHASuKLLOto3Ax573_dxg8bnvQy2ML6yLk",
|
||||
"community_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||
"telegram_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||
"helper_chat_ids": [],
|
||||
"spring_backend_url": "http://localhost:8085"
|
||||
}
|
||||
@@ -50,7 +50,7 @@ def load_config():
|
||||
return json.load(f)
|
||||
|
||||
config = load_config()
|
||||
COMMUNITY_BOT_TOKEN = os.environ.get("COMMUNITY_BOT_TOKEN") or config.get("community_bot_token", "8859374355:AAH0dhwstkTBhRerRTjzmb2RG2fjPbigzvo")
|
||||
COMMUNITY_BOT_TOKEN = os.environ.get("COMMUNITY_BOT_TOKEN") or config.get("community_bot_token", "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY")
|
||||
BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN") or config.get("telegram_bot_token")
|
||||
BACKEND_URL = os.environ.get("SPRING_BACKEND_URL") or config.get("spring_backend_url", "http://localhost:8085")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user