started working on telegram bot
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import os
|
||||
from typing import List, Optional
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
case_sensitive=True,
|
||||
extra="allow"
|
||||
)
|
||||
|
||||
APP_NAME: str = "VibeLawyerBot"
|
||||
VERSION: str = "0.1.0"
|
||||
DEBUG: bool = True
|
||||
TELEGRAM_BOT_TOKEN: str = ""
|
||||
FREE_QUESTIONS_LIMIT: int = 5
|
||||
PAYMENT_AMOUNT: float = 500.0
|
||||
DATABASE_URL: str = "sqlite:///data/bot.db"
|
||||
LOG_LEVEL: str = "INFO"
|
||||
LOG_FILE: str = "logs/bot.log"
|
||||
|
||||
YOOKASSA_SHOP_ID: str = "1230200"
|
||||
YOOKASSA_SECRET_KEY: str = "test_GVoixmlp0FqohXcyFzFHbRlAUoA3B1I2aMtAkAE_ubw"
|
||||
YOOKASSA_RETURN_URL: str = "https://t.me/vibelawyer_bot"
|
||||
YOOKASSA_WEBHOOK_SECRET: Optional[str] = None
|
||||
|
||||
ADMIN_IDS_STR: str = ""
|
||||
|
||||
@property
|
||||
def ADMIN_IDS(self) -> List[int]:
|
||||
if not self.ADMIN_IDS_STR:
|
||||
return []
|
||||
try:
|
||||
return [int(x.strip()) for x in self.ADMIN_IDS_STR.split(",")]
|
||||
except:
|
||||
return []
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user