-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.example.toml
More file actions
100 lines (79 loc) · 3.29 KB
/
config.example.toml
File metadata and controls
100 lines (79 loc) · 3.29 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
config_version = 1.0
[telegram]
api_id = 123456
api_hash = "PUT_YOUR_API_HASH_HERE"
session_file = "data/tgwatch.session"
# Tip: run `tgwatch gui` for the local GUI editor.
# [sender]
# session_file = "data/tgwatch_sender.session" # optional: second account session for bridge sending
[[targets]]
name = "group-1"
target_chat_id = -1001234567890
tracked_user_ids = [11111111, 22222222]
summary_interval_minutes = 3
control_group = "main" # optional when only one control group is configured
[targets.tracked_user_aliases]
11111111 = "Alice"
22222222 = "Bob"
[[targets]]
name = "group-2"
target_chat_id = -1001234567899
tracked_user_ids = [33333333]
summary_interval_minutes = 10
control_group = "main"
[control_groups.main]
control_chat_id = -1009876543210
is_forum = false
topic_routing_enabled = false
skip_html_report = false # set true to only send individual messages, skip HTML report file
[control_groups.main.topic_target_map."-1001234567890"]
11111111 = 9001
22222222 = 9002
[control_groups.main.topic_target_map."-1001234567899"]
33333333 = 9101
# [control_groups.alt]
# control_chat_id = -1001234567000
# is_forum = true
# topic_routing_enabled = true
# [control_groups.alt.topic_target_map."-1001234567899"]
# 33333333 = 9101
[realtime]
# Push mode: "interval" (default) collects messages and sends periodic summaries.
# "realtime" (EXPERIMENTAL) forwards each message immediately as it arrives.
# ⚠ Realtime mode is experimental — behavior and config keys may change in future releases.
push_mode = "interval"
# In realtime mode, an HTML report is still generated at this interval (minutes).
# Default: 120 (every 2 hours). Only applies when push_mode = "realtime".
report_interval_minutes = 120
# ── Rate Protection (realtime mode) ──────────────────────────────────
# These defaults are conservative. Only adjust if you understand Telegram's rate limits.
# Exceeding Telegram's limits can result in temporary bans (FloodWait).
# Maximum messages the bot will send per minute / hour / day.
rate_limit_per_minute = 20 # allowed range: 1–30; warn above 25
rate_limit_per_hour = 200
rate_limit_per_day = 1000
# Minimum seconds between consecutive sends (prevents burst flooding).
min_interval_sec = 3.0
# Extra delay (seconds) added when a message contains media (photos, files, etc.).
media_extra_delay_sec = 2.0
# Warmup: after startup, limit sends to warmup_rate per minute for warmup_minutes.
# This avoids a burst of queued messages triggering Telegram's anti-spam.
warmup_minutes = 5.0
warmup_rate = 5
[storage]
db_path = "data/tgwatch.sqlite3"
media_dir = "data/media"
[reporting]
reports_dir = "reports"
summary_interval_minutes = 120
timezone = "UTC" # e.g., "Asia/Shanghai", "America/Los_Angeles", "America/New_York", "Asia/Tokyo"
retention_days = 30
[display]
template = "normal" # "normal" | "minimal" — layout for single messages forwarded to the control chat (applies to both interval and realtime push modes)
show_ids = true
time_format = "%Y.%m.%d %H:%M:%S (%Z)"
language = "auto" # "auto" | "zh" | "en" — controls push message language
[notifications]
bark_key = "" # optional Bark key for push notifications
heartbeat_interval_hours = 2 # 0 = disable, 1-24
check_updates = true # check GitHub for new releases