-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
114 lines (87 loc) · 4.24 KB
/
Copy path.env.example
File metadata and controls
114 lines (87 loc) · 4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Telegram Bot Token from @BotFather
TELEGRAM_BOT_TOKEN=your_bot_token_here
# Group ID where the bot monitors messages (negative number for groups)
# Example: -1001234567890
GROUP_ID=-1001234567890
# Topic ID where the bot sends warnings (message_thread_id)
# Example: 123
WARNING_TOPIC_ID=123
# Restrict users who fail the profile check (true/false)
# When enabled, users without profile picture or username will be muted
RESTRICT_FAILED_USERS=false
# Number of messages before restricting user (only when RESTRICT_FAILED_USERS=true)
# 1st message: warning, 2 to (N-1): silent, Nth message: restrict
WARNING_THRESHOLD=3
# Minutes before automatically restricting user (time-based enforcement)
# Users will be auto-restricted if they don't complete profile within this duration
# Default: 180 minutes (3 hours), use 5 for testing
WARNING_TIME_THRESHOLD_MINUTES=180
# Path to SQLite database file
DATABASE_PATH=data/bot.db
# Link to group rules message
RULES_LINK=https://t.me/pythonID/290029/321799
# Enable captcha verification for new members (true/false)
# When enabled, new members must click a button to verify they're not bots
CAPTCHA_ENABLED=false
# Timeout in seconds before restricting unverified users
# Default: 120 seconds (2 minutes)
CAPTCHA_TIMEOUT_SECONDS=120
# Restrict users who share contact cards (true/false)
# When true, users sharing contact cards will be restricted (muted)
# When false, contact messages are deleted but user is not restricted
CONTACT_SPAM_RESTRICT=true
# Enable duplicate message spam detection (true/false)
# Detects and restricts users who paste the same message repeatedly
DUPLICATE_SPAM_ENABLED=true
# Time window in seconds for detecting duplicate messages
DUPLICATE_SPAM_WINDOW_SECONDS=120
# Number of similar messages within the window before restricting
DUPLICATE_SPAM_THRESHOLD=2
# Minimum normalized text length to consider (avoids false positives on short messages)
DUPLICATE_SPAM_MIN_LENGTH=20
# Similarity threshold (0.0-1.0) for matching duplicate messages
# 0.95 catches minor edits, 0.97 only near-exact copies, 0.90 is more aggressive
DUPLICATE_SPAM_SIMILARITY=0.95
# Enable/disable bio bait detection (true/false)
BIO_BAIT_ENABLED=true
# Monitor-only mode for bio bait detection (true/false)
# When true: no delete/restrict/warning-topic notification, only metrics + owner alert
BIO_BAIT_MONITOR_ONLY=false
# Owner/admin chat ID to receive bio bait monitor alerts (optional)
# Example: 57747812
# BIO_BAIT_ALERT_CHAT_ID=57747812
# Topic ID for admin-issued /warn moderation messages (optional)
# When set, /warn sends warnings to this topic instead of the main group chat.
# Example: 456
# MODERATION_TOPIC_ID=456
# Path to groups.json for multi-group support (optional)
# If this file exists, per-group settings are loaded from it instead of the
# GROUP_ID/WARNING_TOPIC_ID/etc. fields above. See groups.json.example.
# GROUPS_CONFIG_PATH=groups.json
# Default plugin enable/disable map for all groups (optional, single-group mode)
# JSON object mapping built-in plugin names to booleans.
# Plugins not listed inherit their built-in default (enabled).
# Keys must match known plugin names (e.g. "captcha", "dm", "verify").
# Example: PLUGINS_DEFAULT={"captcha":true,"dm":false}
# PLUGINS_DEFAULT={"captcha":true,"dm":false}
# Guest Bot Whitelist (Telegram Guest Mode - Bot API 10.0)
# Comma-separated list of bot usernames allowed to post guest messages
# Messages from non-whitelisted guest bots are deleted and non-exempt
# human callers are progressively warned/restricted (admins/trusted and
# channel-only callers are delete-only)
# Usernames are case-insensitive, @ prefix is optional
# Example: GUEST_BOT_WHITELIST=@somebot,anotherbot
GUEST_BOT_WHITELIST=
# Logfire Configuration (optional - for production logging)
# Get your token from https://logfire.pydantic.dev
LOGFIRE_TOKEN=your_logfire_token_here
# Service name for Logfire (default: pythonid-bot)
LOGFIRE_SERVICE_NAME=pythonid-bot
# Environment for Logfire (production/staging, auto-detected from BOT_ENV)
LOGFIRE_ENVIRONMENT=production
# Enable/disable Logfire logging (true/false)
# Set to false for local development to avoid quota usage
LOGFIRE_ENABLED=false
# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
# Use DEBUG for detailed logs, INFO for production
LOG_LEVEL=INFO