# ── Telegram ────────────────────────────────────────────── # Bot token from @BotFather (/newbot). BOT_TOKEN= # ── AI provider (OpenAI-compatible) ─────────────────────── # Works with any OpenAI-compatible API: SiliconFlow (default), # OpenAI, DeepSeek, a local vLLM/Ollama relay, or any gateway. AI_API_KEY= # Default endpoint targets SiliconFlow — get a key at https://cloud.siliconflow.cn AI_BASE_URL=https://api.siliconflow.cn/v1 AI_MODEL=deepseek-ai/DeepSeek-V4-Flash # Vision — comma-separated fallback chain (first model that succeeds wins). AI_VISION_MODELS=Qwen/Qwen3-VL-30B-A3B-Instruct,Qwen/Qwen3-VL-32B-Instruct,Qwen/Qwen3-VL-8B-Instruct # Voice-message transcription/understanding model. AI_AUDIO_MODEL=Qwen/Qwen3-Omni-30B-A3B-Instruct # Images are downscaled to this width before being sent to the vision model. AI_IMAGE_MAX_WIDTH=600 # Optional second provider, tried only after every primary model failed. # Leave the key empty to disable (default). Useful because a primary outage # otherwise drops spam judging down to the keyword lexicon on its own. AI_FALLBACK_API_KEY= AI_FALLBACK_BASE_URL= AI_FALLBACK_MODEL= # Optional; the fallback text model is reused for images when this is empty. AI_FALLBACK_VISION_MODEL= # ── Ownership ───────────────────────────────────────────── # Your Telegram numeric user ID. Unlocks /groups (view and clear the blocklist # of groups the bot left over missing rights). Leave empty and nobody has it — # there is deliberately no "first person to /start becomes the admin" fallback. # Get yours from @userinfobot. ADMIN_USER_ID= # ── Storage ─────────────────────────────────────────────── DB_PATH=/data/bot.db # ── Anti-spam tuning ────────────────────────────────────── # New-user probation window (seconds). SPAM_NEWUSER_COOLDOWN=300 # Identical message repeated this many times → flooding. SPAM_REPEAT_THRESHOLD=3 # ...within this window (seconds). SPAM_REPEAT_WINDOW=300 # Chinese-slang lexicon hard-hit threshold (prefilter). Higher = stricter. LEXICON_HARD_THRESHOLD=6 # Probe ("check-in") filler: silently delete after this many flags. Never bans. PROBE_FLAG_DELETE=2 # Rolling window for those flags (hours); older flags reset the count. PROBE_WINDOW_HOURS=24 # How much of a long message the judge sees (clipped head + tail, not head only). JUDGE_TEXT_LIMIT=1800 JUDGE_CAPTION_LIMIT=900 # Cooldown (seconds) on public group commands for non-admins, so the bot cannot # be used as a megaphone to bump someone's message. Admins are never limited. GROUP_CMD_COOLDOWN=60