From 94684fe177c5dde49cfd054bed07c58b07a4e0c8 Mon Sep 17 00:00:00 2001 From: lew Date: Fri, 10 Apr 2026 22:33:35 +0100 Subject: [PATCH] docs: updates to readme for new telegram content --- README.md | 109 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d3d8877..cee5552 100644 --- a/README.md +++ b/README.md @@ -316,25 +316,43 @@ When Telegram moderation is enabled, the notification includes a `/voice_note_/getUpdates) endpoint. -When a visitor submits an entry, the bot sends a formatted message with bold section headers showing the entry details, any attached media as on-demand commands (`/drawing_`, `/voice_note_`), and moderation commands. If the notification fails to send, it retries in the background (configurable via `BOOK_TELEGRAM_RETRY_INTERVAL` and `BOOK_TELEGRAM_RETRY_LIMIT`). +When a visitor submits an entry, the bot sends a notification with the entry details and moderation commands. If the send fails, it retries in the background (`BOOK_TELEGRAM_RETRY_INTERVAL`, `BOOK_TELEGRAM_RETRY_LIMIT`). A periodic reminder will remind you about any pending entries once a day by default (`BOOK_TELEGRAM_REMINDER_INTERVAL` seconds, 0 to disable). -The bot also registers these commands in the Telegram command menu (visible when you type `/`): +#### Commands -- `/pending` — list all pending entries with previews -- `/approved` — list all approved entries -- `/denied` — list all denied entries +```bash +# List pending, approved, or denied entries. +/pending +/approved +/denied -Each listed entry includes a `/view_` link. Viewing an entry shows the full details, drawing, and voice note, along with `/allow_` and `/deny_` commands. +# View the full details of an entry. +/view_ -To delete an entry and all its associated media (drawing, voice note), use `/delete_`. +# View entry attachments, if they exist. +/drawing_ +/voice_note_ -None of these commands require clicking on the links. They'll all just work by typing them in the chat to your bot. +# Approve and deny entries. +/allow_ +/deny_ + +# Append a reply to an entry. +# Reply is a multi-line command. Your reply will be appended +# to the guestbook entry, prefixed by `>>`. +/reply_ +[response] + +# Delete an entry. +/delete_ +/confirm_delete_ +``` --- ### Entry Format -Each entry is a plain text file in `{data_dir}/entries/`. The filename is a 4-character base36 ID (e.g., `ab3c.txt`). Drawings and voice notes share the same ID (`ab3c.png`, `ab3c.webm`) in their respective directories. Entries are anchor-linkable on the web page via `#id`. +Each entry is a plain text file in `{data_dir}/entries/`. The filename is a 4-character base36 ID (e.g., `ab3c.txt`). Drawings and voice notes share the same ID (`ab3c.png`, `ab3c.webm`) in their respective directories. Entries can be anchor linked via `#id`. ``` +++ @@ -345,12 +363,15 @@ drawing = "ab3c.png" voice_note = "ab3c.webm" status = "approved" +++ -Message body here. +Message body here. This is what someone +entered into the 'message' field. ->> Owner reply lines prefixed with ">> ". +>> This is a reply. You can append +>> to a message manually, and format +>> yourself, or /reply_ to the bot. ``` -The `status` field can be `pending`, `approved`, or `denied`. Only approved entries are displayed. The `drawing` and `voice_note` fields are empty when there's no drawing or voice note. Replies can be added via Telegram (`/reply_`) or by hand-editing the body. To moderate without Telegram, just edit the file and change `status` to `approved` or `denied`. +`status` is either `pending`, `approved`, or `denied`. Only approved entries are displayed. `drawing` and `voice_note` fields link to their respective attachments, or nothing if they're empty. State is all stored in these files so you can moderate however you like, either via the built-in bot or just by manually editing the `status` field yourself. --- @@ -375,8 +396,7 @@ The `status` field can be `pending`, `approved`, or `denied`. Only approved entr BOOK_LABEL_NAME, BOOK_LABEL_WEBSITE, BOOK_LABEL_MESSAGE, BOOK_BUTTON_TEXT, BOOK_TEXTAREA_WIDTH, BOOK_TEXTAREA_HEIGHT. Empty when BOOK_ENABLE_SUBMISSIONS=false. - entries - Approved guestbook entries, newest first. Entry separator - controlled by BOOK_SEPARATOR. + entries - Approved guestbook entries, newest first. style - Custom CSS from BOOK_STYLE or BOOK_STYLE_FILE, wrapped in a