| # ββ 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 | |