website / greasyfork / github
mass delete all discord messages from any dm or channel
download a userscripts manager (eg. ViolentMonkey)
Note: Chrome users: ViolentMonkey is unsupported due to extension Manifest V2 deprecation. A temporary workaround is needed: steps to allow legacy extension manifest version flag
trash icon
in top right-hand cornerget
buttons in the popupstart
buttonprevent automatically sleeping on power adapter
(optional -> see note below)Note: I recommend you skim through the entire chat to confirm if all messages are deleted. If not simply re-run until all done (sorry this is a bug - its not perfect, but still better than manually deleting single msgs imo)
re-enable allowing computer to sleep
(optional -> see note below)Note: you only need to prevent sleep if you have a lot of messages to delete and/or will likely not be using your computer the whole time (ie. display turns off and computer sleeps) (instructions for macOS, please google and share for other OS)
self-explanatory. refer to the forked wiki if you need more info
find message ids
by right-clicking them
adjust delay
in ms to test for optimal deletion rate
Range
before date
after date
After message id
Before message id
Search Delay
rec: 1000Delete Delay
rec: 800Search messages
Containing Text
Has: Link
Has: File
Include Pinned
sample options for dm - here i pressed the get
buttons, selected date range
and adjusted the delete delay
with screenshot mode
this is what it looks like right after pressing start
. total number of messages to delete (might be slightly inaccurate due to system messages)
when rate limited, might only delete 1-3 messages are between short delays. The script adjusts the delete api call delays according to response (usually 0.5 - 2 ms)
when not being ratelimited, it goes pretty fast.
bug where percent deleted exceeds or below 100% – i think it might be off by ~1000s of messages. you can see the datetime of the latest messages deleted and estimate how many are left since the beginning / end of your messaging history until this is fixed
once all messages are found and deleted, the script will end automatically. I recommend you press start
again to delete any messages it missed - not sure why this happens, but its only a small percent that get missed
only few 100s of messages were found the 2nd time, idk im paranoid so, run it few more times just in case!
after rerunning obsessively, it’ll eventually get to 0. I recommend you skim through the entire chat to confirm.
I didn’t test all the features so, read up on it in wiki and use at your own risk the following features:
get
valuesI’ll accept easy to review changes (eg. few lines of code & test screenshots) or steps (screenshots) on how to make it work for other browser / OS.
I don’t plan to maintain this regularly, but I can confirm it works as of this initial upload date. I might have to update it the next time I send a lot of regrettable message to someone. If victornpb/undiscord becomes active again, I’ll likely cherry-pick commits into this fork to have my own copy.
this is an active fork of victornpb/undiscord which hasn’t been updated in over a year, so i forked it to fix small bugs. I’ve only fixed the bugs that made the script pause or quit prematurely - i didn’t add any new features.
If this ever breaks, I recommend you first check out:
i adhere to the original creator’s Privacy Policy
discord explicity prohibits the use of unauthorized third-party scripts through their TOS. so, usage of this script can result in consequences such as account suspension, bans, etc. personally haven’t had issues but, please use at your own risk.