# Create channel cleaners

{% hint style="info" %}
**Good to Know:** Channel cleaners run every hour on the hour.&#x20;
{% endhint %}

## Channel Cleaners

1. In betzy's dashboard go to "Channel Cleaners"\
   \
   ![](/files/r4vmSGFtp9VcD9aTzTGJ)
2. You will notice the "Create New Cleaner" component\
   \
   ![](/files/nkbRFgdBUfyqqmB9ttOD)
3. From the drop-down list select channel or category to delete\
   \
   ![](/files/dRS46okER7Ptp0P4yFeM)
4. Enter the time in hours you want to delete\
   \
   ![](/files/WqWsFXwxO0SKTbti5GUD)

{% hint style="warning" %}
**Important:** \
\
\- The discord API does not allow the bulk deletion of messages older than 14 days. Any messages older than 14 days will be ignored.\
\
\- Due to the inefficiency of how the discord API is able to handle this we will only search the most recently 500 messages each run. Every time this runs as well it will search remaining messages, so if little messages are sent in that hour it could delete messages older than the previous run if you hit the 500 max in the previous run.
{% endhint %}

5. Click "add" button\
   \
   ![](/files/7MwwlHXF0lOkL4XIlOnd)
6. You will be able to see your new record on the screen\
   \
   ![](/files/lz41gYVnqjAy2ajqrnUO)<br>
7. Messages older than 1 hours old are deleted hourly at the top of the hour. \
   \
   ![](/files/L3rwhmmi6owHpUkbFCDK)

{% hint style="danger" %}
This is a very taxing operation for both Betsy API and the rate limits of the Discord API. This is an experimental feature and will be evaluated often. It could be removed in the future if it poses risk to Betsy.\
\
You do **NOT** get Message Delete events for this operation. Discord does not support message delete events for bulk deletions.
{% endhint %}


---

# 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://docs.betsybot.xyz/features/channel-cleaners/create-channel-cleaners.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.
