phpbotscout forget¶
Carries out a request to be forgotten (spec 0032). It disconnects one Discord user from their questions, the answers the bot gave them, and their 👍 / 👎 votes, then rewrites the database file so nothing connecting them survives in it.
What was said in a public channel stays, and so does every count built on it:
| Record | Kept | Removed |
|---|---|---|
| Their questions | the text and the topic it counts towards | nothing; the link was always the answer |
| The answers they were given | what the bot said, its citations, outcome and review verdict | the user hash, and the channel, thread and message IDs |
| Their votes | the verdict, and the answer it judged | the user hash, replaced by a random value |
The Discord IDs go with the hash because the thread they point at names the person who asked.
It reads the database serve writes, at index.path, and covers every server that
database holds. It can run while serve is running. It needs no Discord, forge or AI credentials.
Usage¶
Give the person's Discord user ID as the argument, or on standard input. An argument is recorded in your shell history; standard input is not.
$ phpbotscout forget 123456789012345678
Would disconnect 2 answers and 1 vote. Nothing has changed yet.
Run the same command with --yes to make the change, or --show to list them.
$ echo 123456789012345678 | phpbotscout forget --yes
Disconnected 2 answers and 1 vote.
The database file has been rewritten, so nothing connecting them remains in it.
--show lists what is held, for sending to the person who asked:
$ phpbotscout forget --show 123456789012345678
Answers (1)
2026-10-04 answered
Question: how does config precedence work?
Answer:
Flags beat environment variables, which beat the config file.
Votes (1)
2026-10-05 helpful, on: how do I add a command?
An answer older than 120 days shows (text expired), because its text has already been purged.
Flags¶
| Flag | Meaning |
|---|---|
--yes |
Make the change. Without it the command only says what it would change. |
--show |
List what is held and change nothing. Overrides --yes. |
Global flags (--config, --debug, --output, --ci, --accessible) are inherited from the
root command.
Running it again¶
Every step selects by the person's hash, so running the command again after an interruption
finishes the job and touches nobody else. A second run reports 0 answers and 0 votes and rewrites
the file again.
The rewrite is a VACUUM followed by a WAL checkpoint. If serve is in the middle of a read, the
checkpoint cannot complete and the command fails after three tries:
The records are already disconnected at that point. Run the same command again to finish the rewrite.
What it does not reach¶
- Anything already posted to a GitLab issue. Editing or deleting the issue is done by hand.
- Messages in Discord: the person's own, and the bot's replies to them.
- The AI provider's side of the request, which its own terms govern.
- Log lines and backups younger than 30 days. Both expire at 30 days; see handling a request to be forgotten.
The ID never reaches the log or the output.
See also¶
- Handle a request to be forgotten: the whole request, from finding the ID to telling the person it is done
- The policy: what the person is promised