A self-hosted Discord bot
CleanChat has reached End-Of-Life, and has been discontinued/'shut down' as of February 12th 2022.
Thanks to everyone who used CleanChat.
CleanChat is not available as a self-hosted service. CleanChat AutoClearChannel is however still available, but will not recieve software updates.
The hosting service has also been discontinued.
This website will stay online purely for archival reasons.
For more information about why CleanChat was discontinued, please refer to my Discord: https://discord.gg/QzGnuvy , or by reading the attached document.
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 hosting service has been discontinued along with the hosting of CleanChat.
Follow the tutorial below, or refer to one of these 3rd party tutorials provided by community members.
- CleanChatAutoClearChannel in Docker by Rikj000: https://github.com/Rikj000/CleanChat-AutoClearChannel-Docker
- Setting up CleanChat AutoClearChannel self hosting on a linux VPS (Debian) by @General Louis#0616: https://discord.com/channels/388818688394133505/430383993570066471/941381542389878805 (posted in the Discord CleanChat Support Server [INVITE])
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.
- Have .NET Core 3.1 installed on your server:
- Windows: ONLY if using PORTABLE: https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-3.1.3-windows-x64-installer
- Mac: https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-3.1.3-macos-x64-installer
- Linux: https://docs.microsoft.com/da-dk/dotnet/core/install/linux-package-manager-ubuntu-1910
- Download the package: Downloads.
- Unzip the package on your computer.
- Go to the Discord Developer Portal and create a new application with a bot: https://discordapp.com/developers/applications
config.jsonand fill in the config file. See Configuration for help.
- Run the executeable:
- PORTABLE: Run in commandline:
- PORTABLE: Run in commandline:
Download latest version:
Latest version is: 184.108.40.206
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.
ConfigurationThe bot is configured through the
config.jsonfile, placed 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:
|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!
|autoclearchannel||Automatically clean your channels|
|status||Shows current settings|
|forcepublicreply||Answers to your commands in the channel instead of DM||purge||Mass-delete commands|
autoclearchannelBack to commands
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
Example of used correctly:
@Bot autoclearchannel #channel 5s
statusBack to commands
Shows current configuration of the bot.
resetBack to commands
The bot forgets everything about your server.
Can be used if you want to start-over.
forcepublicreplyBack 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
Example of used correctly:
@Bot forcepublicreply true
purgeBack 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:
|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
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.