Files
myfirstprogram/config.py
T
2025-10-29 21:46:06 +03:00

47 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import os
from dotenv import load_dotenv
from typing import Dict
class Config:
# Загружаем .env
load_dotenv()
# API
API_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN")
Token = os.getenv("ACCESS_TOKEN")
DEEPGRAM_API_KEY = os.getenv("DEEPGRAM_API_KEY")
DEEPGRAM_AGENT_URL = "https://api.deepgram.com/v1/agent/think"
DEEPGRAM_TTS_URL = "https://api.deepgram.com/v1/speak?"
# 5575756416
BAN = [1]
if not API_TOKEN:
raise ValueError("❌ TELEGRAM_BOT_TOKEN не найден в переменных окружения!")
# Admins (user_id: уровень)
ADMINS: Dict[int, int] = {850906163: 0, 6394047531: 4, 1345058877: 3}
Names: Dict[int, str] = {850906163: "Ляпич", 6394047531: "Прокопович"}
# Chats
CHAT_IDS = [-1003038389942]
GROUP_CHATS: Dict[str, int] = {
"30тс": -1003038389942,
"5Cа": 7571257031,
}
# Settings
ANTISPAM_DELAY = 600
WATCHER_BASE_DELAY = 600
# Пути
LOG_FILE = "storage/log/bot.log"
DAYS_TO_DB_PATH = "addons/x_days_to/days_to_new_year.db"
if __name__ == "__main__":
a = Config()
print(a.API_TOKEN)
print(a.ADMINS)