# Bot History

Bot History is the operational log for Telegram bot commands connected to your organisation. It shows what ran, when it ran, what status it reached, and enough detail to diagnose unexpected bot behaviour.

### Who can use it

Editors and Admins can view Bot History. Admin-only controls appear for queue recovery and log cleanup.

### What you'll see

* **Active queue** - in-flight bot commands with live status
* **Command log** - recent commands, status, input, parameters, response JSON, generated image links, and errors
* **Filters** - all commands or specific commands such as `/generate`, `/rewrite`, `/news`, `/whatsworking`, `/brand`, `/help`, and `/cancel`
* **Timing** - created time and processing duration when available
* **Chat and user IDs** - identifiers for troubleshooting allowlist and access issues

### Admin tools

Admins can:

* Cancel one processing command
* Cancel all in-flight commands for the org
* Clear errors
* Clear completed or canceled rows
* Clear all non-in-flight rows
* Unstick the Telegram webhook by dropping the pending-update backlog and re-registering the webhook

Use destructive cleanup actions carefully; cleared rows are removed from the bot log.

### Workflow

* Open Bot History to audit a specific command or diagnose an error
* Use the active queue when the bot appears stuck
* Use admin recovery tools only when a command is truly stale or the webhook is replaying old updates

### Tips

* Bot History is an operational tool, not just a read-only archive
* Capture the timestamp, command, and error before escalating a recurring bot issue
* See [Telegram Bot](/thecontentforge-docs/admin-guide/telegram-bot.md) for setup and commands


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://thecontentforge.gitbook.io/thecontentforge-docs/feature-guides/bot-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
