3.2 KiB
3.2 KiB
Batch 10 — Documentation Updates
Summary
Updated docs/COMMANDS.md and docs/MODERATION.md to reflect changes from the refinement pass.
docs/COMMANDS.md Changes
1. /get_id — now available in channels too (admin-only)
- Changed section header from "Admin Commands (Group-only)" to "Admin Commands (Groups & Channels)".
- Added note: "They work in groups, supergroups, and channels where the bot is present."
- Updated
/get_iddescriptions to mention it works in groups, supergroups, and channels.
2. /help — [arg] format note
- Added note to
/helpdescription: "Argument placeholders in the help text use[arg]format to avoid Telegram HTML parse errors with angle brackets."
3. /blacklist_uid and /whitelist_uid — stricter restrictions + usage info
- Updated descriptions to explicitly state: "Restricted to configured admin groups; the caller must be an admin there."
- Added the exact usage info shown when args are missing:
/blacklist_uid:Usage: /blacklist_uid <user_id>/whitelist_uid:Usage: /whitelist_uid <user_id>
4. Punishment commands — propagation note
- Added to
/sban,/smute,/mute,/pban,/kickdescriptions:- "Propagates across all known chats when
global_ban = true."
- "Propagates across all known chats when
5. Forward submission review buttons
- Added new "Review Message Buttons" subsection under Forward Submissions.
- Documents the inline keyboard layout on review messages:
- Row 1:
[ Approve ],[ Ignore ] - Row 2:
[ Blackl. ],[ Ban ],[ Ban/BL u. ]
- Row 1:
- Notes these correspond to the existing
v1:fwd:...callbacks.
docs/MODERATION.md Changes
1. global_ban config option under [groups]
- Reworded the Global Ban Configuration intro to clarify: "The
[groups]section in the config contains the optionalglobal_banflag (defaultfalse)." - Included
/kickin the list of propagated commands.
2. Propagated punishments recorded per-chat
- Added "Propagation Behavior" subsection.
- Documents that each propagated punishment is a separate row in
punishmentswith its ownchat_id. - Explains implications:
- Background expiration revokes each independently.
- Manual
/rmute//rbanonly affects the local chat. - Bot skips chats where it is not an admin and logs a warning.
3. Hash blacklist behavior (migration 007, HashBlacklistRepo)
- Added new "Hash Blacklist" section.
- Includes the
007_hash_blacklist.sqlschema. - Documents
HashBlacklistRepo::insertandHashBlacklistRepo::contains. - Describes pipeline behavior: BLAKE3 plaintext hash is checked against the blacklist before deduplication and persistence; blocked hashes raise
BlockedHashand discard the temp file.
4. Username tracking (uname_changes_path config)
- Added new "Username Tracking" section.
- Documents config placement (top-level, default
"data/uname_changes.json"). - Explains trigger:
UserRepo::ensure_existson every message/callback. - Shows JSON line format with
timestamp,user_id,chat_id,old_username,new_username. - Notes append-mode file handling.
Changed Files
docs/COMMANDS.mddocs/MODERATION.mdprogress.md(updated)