diff --git a/DOCS-commands.md b/DOCS-commands.md index fd13e35..d6572f2 100644 --- a/DOCS-commands.md +++ b/DOCS-commands.md @@ -26,10 +26,18 @@ This file is the trigger reference — every spelling that resolves, which | stats_weekdays | `!dni` `!days` | | stats_me | `!ja` `!moje` `!mnie` | | help | `!pomoc` `!pomocy` `!help` `!komendy` `!commands` | +| add_photo | `!dodaj` `!dodaj_zdjecie` `!dodajzdjecie` `!add_photo` `!addphoto` | +| random | `!losowe` `!losuj` `!random` `!rand` | Aliases live in `signal_bot/aliases.json`, not in source, because they are data: adding one should never mean touching Python. +`add_photo` and `random` exist **only in the photo album's own groups**, and +only on an installation that has an album at all — everywhere else they are +not commands, not refused and never logged. Both take arguments, and those +arguments are resolved to pseudonym keys by the registry before any handler, +log line or `command_uses` row sees them. See `DOCS-photo-pack.md`. + ## Why `!pomoc` shows the first alias and not a trigger `Command.triggers` is a `frozenset` of **folded skeletons** — `folding.py` diff --git a/DOCS-photo-pack.md b/DOCS-photo-pack.md index b9ee917..c074e1d 100644 --- a/DOCS-photo-pack.md +++ b/DOCS-photo-pack.md @@ -82,6 +82,123 @@ Videos work. The attachment goes out as container's own, from its `/swagger/doc.json` — because told it is a photo, Signal renders a clip as a file nobody can play. +## custom.json + +```json +{"t1": ["wakacje2019"], "t2": ["gorybieszczady"]} +``` + +Labels `!add_photo` learned from the chat that match no person. The key is a +pseudonym in the same family as `p1` — it is what reaches `tags.json`, a log +line and a reply — and the label is the only place the typed word is kept. +Custom tags define **no commands**: `!random