# Keeping text neat

### Removing old messages from a text channel automatically

{% hint style="info" %}
Only a user with server admin permissions or server management permissions can perform this command.
{% endhint %}

{% hint style="info" %}
Talkbot will need Manage Messages channel permissions to be able to use this functionality.&#x20;
{% endhint %}

You may want to remove the text in the channel after a while to keep the text channel neat. Talkbot can do this for you using **!keep. !keep** works by removing the oldest messages after the count. For example !keep 20 will retain 20 messages in the channel and delete any older messages than this.

If the messages were there before control was taken of Talkbot !keep will not delete those messages.

Example:

```
!keep 20
```

To reset keep to retain all messages use **!keep all**

Example:

```
!keep all
```


---

# 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://nullabork.gitbook.io/talkbot/use-cases/keeping-text-neat.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.
