A plugin for Discord that puts a timer on the messages you send. After the time you set runs out, each message deletes itself. A small countdown sits under every message that is waiting, and a Keep button cancels it if you change your mind.
You set the timer per channel, per category, or per server. Nothing is deleted anywhere you have not asked for.
This is a Vencord userplugin. Vencord is a client mod: extra code that runs inside the normal Discord desktop app and adds features to it. Plugins like this one are not downloaded from a store, they are compiled into Vencord.
That means the ready made Vencord installer cannot load this plugin. You need a copy of Vencord that you built yourself. If you have not done that before, follow Vencord's own guide first and come back when Discord is running your own build:
Installing Vencord from source
You will end up with a Vencord folder on your computer. Everything below happens inside that folder.
Open a terminal in the root of your Vencord folder, the one that contains src and
package.json, and make sure you have already run pnpm install there once.
Then run these three commands:
git clone https://github.com/KernelSpecter/AutoDelete src/userplugins/autoDelete
pnpm build
pnpm injectWhat each one does:
git cloneputs the plugin where Vencord looks for user plugins.pnpm buildcompiles Vencord together with the plugin.pnpm injectpoints your Discord app at that build. You only need this the first time. After that,pnpm buildalone is enough.
Now restart Discord, open Settings > Plugins, search for AutoDelete, and turn it on.
To update later, run git pull inside src/userplugins/autoDelete and then pnpm build
again.
This is on purpose. Out of the box the plugin is set to only where I set a rule, so enabling it does not start deleting anything. You have to point it at a place first.
Two ways to do that:
- Right click a channel in the sidebar and choose Auto-delete here.
- Or type a command in the channel:
/autodelete here 10m
If you want to watch it work without it deleting anything yet, turn on dry run in the plugin settings. The countdown still appears and says would delete, and nothing is actually removed. This is the safest way to get used to it.
Timers are written the way you would say them: 45s, 10m, 1h 30m, 2 days. A plain
number means seconds. The shortest allowed is 3 seconds and the longest is 14 days.
You can set rules at several levels. The most specific one always wins.
| Rule set on | Overrides |
|---|---|
| A single channel | everything below it |
| The channel's category | the server rule and the default |
| A whole server | the default |
| The scope setting and default timer | nothing, this is the fallback |
Setting a place to off here is different from having no rule at all. Off here means "never delete anything here", and it cannot be overridden by anything, including the reply and reaction triggers below. Having no rule just means the general scope setting decides.
- Any message containing
!keepis never given a timer. Adding!keepto a message that is already counting down cancels it. - Pinned messages are left alone. If you pin a message that is already counting down, it is spared.
- The Keep button, either in the bar that appears when you hover a message or in its right click menu. This works any time before the countdown reaches zero.
- Messages you attached a file to, if you switch that option on.
The countdown turns red for the last ten seconds, which is the point of showing it at all.
Two extra triggers can delete a message sooner. Both are off by default, and both only work in places where a timer already applies, so the rules you set stay in charge.
- On reply. Someone replies to your message. How much goes with it is up to the chain mode setting: only that one message, the run of messages it belongs to, or the reply thread it is part of. Never more than 25 messages either way.
- On reaction. Your message collects reactions from other people, up to a number you choose. Your own reactions are not counted.
| Command | What it does |
|---|---|
/autodelete |
Shows what is happening here and overall |
/autodelete here <timer> |
Sets a timer for this channel. off to protect it, clear to remove the rule |
/autodelete server <timer> |
Sets a timer for the whole server |
/autodelete rules |
Lists every rule you have set |
/autodelete arm on|off |
Stops new messages being scheduled, without losing your rules |
| Setting | Default | Why it is there |
|---|---|---|
| Jitter | 10% | Adds a little random time after your timer, so a group of messages does not disappear all at once. It never deletes anything early |
| Minimum interval | 1200 ms | The smallest gap between two deletions. Messages are removed one at a time, never in parallel |
| Max queue age | 7 days | If a timer ran out while Discord was closed for longer than this, the message is forgotten rather than deleted |
| Dry run | off | Reports what it would delete and deletes nothing |
| Arm | on | A master switch that pauses new timers without touching your rules |
Messages waiting to be deleted are stored in your browser database inside Discord, so they survive a restart. The plugin keeps a single timer set to the next deadline rather than one timer per message.
If messages came due while Discord was closed, they are cleared out slowly on the next start, one every 2.5 seconds, and you get a notice saying how many. Going slowly here is deliberate: a sudden burst of deletions is the thing worth avoiding.
If a delete request fails, it is tried once more and then dropped with a note in the log. A message that was already gone counts as done. Repeated failures make the queue slow down instead of retrying harder.
The scheduling and rule logic are covered by 148 tests that run on a fake clock, so timing, catch up after a restart, saved state, and the reply walk are all checked without touching Discord.
node tests/run.mjsThey use the esbuild copy from the surrounding Vencord folder and need nothing installed of their own.
There is no bulk delete, no "remove my last 50 messages", and no way to aim it at an account or a server you are not in. Everything it deletes is a message you sent while it was already watching that place, one at a time, and you can always see what is queued.
Automating a user account is against the Discord Terms of Service in any form, and a client mod is not an exception to that. Use sensible timers.
GPL-3.0-or-later, the same licence as Vencord. There was a selfbot version before.