feat(captcha): add validation and thread editing
This commit is contained in:
@@ -131,6 +131,10 @@ class Config:
|
||||
).lower() == "true"
|
||||
captcha_answer = os.getenv(key="CAPTCHA_ANSWER", default=None)
|
||||
|
||||
# Validate captcha configuration
|
||||
if enable_captcha and not captcha_answer:
|
||||
raise ConfigError("ENABLE_CAPTCHA установлен, но CAPTCHA_ANSWER не задан")
|
||||
|
||||
return {
|
||||
# Pyrogram
|
||||
"api_id": api_id,
|
||||
|
||||
Reference in New Issue
Block a user