Go Back


A self-hosted Discord bot

CleanChat AutoClearChannel (ACC for short), is a simple self-hosted Discord bot which can automatically delete messages after a certain delay in a channel. It also includes a purge command for easily purging loads of messages really quickly. The bot itself is a replacement for the AutoClearChannel in CleanChat.

Here is a small tutorial video showing what AutoClearChannel can do, and how to make a server via the hosting service with no prior knowlegde of the bot.


The bot is self-hosted meaning that you will have to host it yourself! There is also a paid hosting service for those who cannot host their own bot.

Read more about the hosting service here

Install instructions:

  1. Have .NET Core 3.1 installed on your server:
  2. Download the package: Downloads.
  3. Unzip the package on your computer.
  4. Go to the Discord Developer Portal and create a new application with a bot: https://discordapp.com/developers/applications
  5. Copy
    and fill in the config file. See Configuration for help.
  6. Run the executeable:
    • PORTABLE: Run in commandline:
      dotnet CleanChat-AutoClearChannel.dll
    • WINDOWS:


Download latest version:
Latest version is:

The WINDOWS build obviously only runs on Windows, but dosn't require .NET Core 3.1. The drawback is then that the filesize is a lot bigger.

The PORTABLE build runs on all systems, but requires .NET Core 3.1.
For Linux users, you can download a free auto-update-script that will keep the bot updated: https://pastebin.com/nZL0pvQP. Download and save as start.sh, and launch that when you run the server.


The bot is configured through the
file, plased in the same root directory as the executeable.

The config file looks like this:

Here's a table of all the properties in the file:

Property Value Type Descrption
bottoken Discord Bot Token Your token from the Discord Developer Portal
statusText string What the bot will be apearing to be "playing"
outputJsonLog boolean If set to true, the log will be displayed in JSON format.


Below you'll find a long list of commands. If you click on a command, you'll be taken to an explanation of that command, along with use cases for set command.

All commands needs to start with you tagging your bot.
This means you have to put @YourBotName#1234 in front of every command, before it works!


Automatically clean your channels
Shows current settings
Resets settings
Answers to your commands in the channel instead of DM
Mass-delete commands
Get permalink to this command


Back to commands


autoclearchat, acc

This command can be used to automatically clear a channel after a specified time.

That means if you set it at 5 seconds, then the bot will delete every message after they have each spent 5 seconds in chat.

The delay is set in milliseconds or a "formatted time string"

"Formatted time strings" looks like this:
"2s" means "2 Seconds"
"5m1s" means "5 Minutes and 1 Second"
"10h6m10s" means "10 Hours, 6 Minutes and 10 seconds"
"2s500ms" means "2 Seconds and 500 Milliseconds"

So basically a number, and then a letter representing a time unit.
"ms" means "Milliseconds"
"s" means "Seconds"
"m" means "Minutes"
"h" means "Hours"
"d" means "Days"

If you want to remove a autoclearchannel again, you must set the deletion delay to 0.


@Bot autoclearchannel <#channel> <time in ms | formatted time string> 
Show/hide argument information
Argument Type of input Required? Default (if not required)
#channel #channel
time in ms | formatted time string Milliseconds (ms) or Formatted time string

Example of used correctly:

@Bot autoclearchannel #channel 5s
Get permalink to this command


Back to commands

Shows current configuration of the bot.


@Bot status
Get permalink to this command


Back to commands

The bot forgets everything about your server.
Can be used if you want to start-over.


@Bot reset 
Get permalink to this command


Back to commands



If enabled, the bot will always reply in chat, instead of in DM's.
This feature is useful if you don't want people on your server to be able to DM you, but you still want to use the bot.


@Bot forcepulicreply <true | false>
Show/hide argument information
Argument Type of input Required? Default (if not required)
true | false Boolean (true or false)

Example of used correctly:

@Bot forcepublicreply true
Get permalink to this command


Back to commands



Will delete set number of messages from chat.
You can only delete a maximum of 100 messages per command execution.

The bot will skip any pinned messages.

If a user is specefied, the bot will only delete messages sent by that user.
This command supports filters. The following filters are available:

Filter Usage Description
Deletes the message if it contains the <string>
Deletes the message if it starts with the <string>
Deletes the message if it ends with the <string>
Deletes the message if it has an image attached
Deletes the message if it does not have an image attached
Deletes the message if it matches the <regex> (Advanced)

Note: The bot can only mass-delete messages that're under 14 days old. This is a limitation set by Discord, which I can't do anything about, even if I wanted.


@Bot purge <number> [user | filter] [filter] 
Show/hide argument information
Argument Type of input Required? Default (if not required)
number Integer (Whole number)
user | filter @Mention OR Filter Nothing
filter Filter Nothing

Examples of used correctly:

@Bot purge 50
@Bot purge 25 @AlexanderNorup#4981
@Bot purge 25 contains:banana

Need more help?

Join the support server where you can ask the developer directly for help. Please understand that he may not help immediately, as the developer also has a real life. But stay on the server, and he will be sure to @mention you when he replies you.