When Discord was released, it changed the concept of instant messaging and group chats forever. In the decade before it was launched, you could have been using AOL Instant Messenger, MSN Messenger, or a newer version of Skype – two of which no longer exist, and the latter has been hit hard by the popularity of Discord.
Before Discord, we never knew what it was like to have a messaging service that permanently stores our conversation history in the cloud. To store current logs locally on AIM or MSN you will need some third party plugin. Skype now stores text logs in the cloud for just 30 days.
For some, keeping your message history forever is great. For others, it’s a nightmare. In January 2017, Discord revealed how they can store billions of blog posts, and it looks like this policy won’t change anytime soon. Discord also does not offer users the option to bulk delete their DM history on Discord.
So what happens if you’ve sent thousands of private messages and decide you don’t want them to last forever? There are several solutions, but none of them are perfect.
Delete Discord DM record on discord using hotkeys
The most intuitive way to delete a Discord post is to
- hover over it to open the hamburger menu icon on the right.
- click the icon.
- select “Delete”.
- confirmation of deletion by pressing the “Delete” button.
However, this requires constant use of the mouse, which significantly slows down the process. Therefore, you should know the sequence of keyboard commands that mimic this procedure.
Here’s a breakdown of the sequence:
- Log into the DM Discord.
- Press up once to select your last message.
- Click up again to activate the editor.
- Press Ctrl + A to select all the text in the field.
- Press Backspace to delete the text.
- Press Enter once to confirm your edit.
- Press Enter again to confirm the deletion at the prompt.
It seems like a long and tedious process, but in practice you get into a rhythm and it only takes a second to delete each message. This requires a lot less steady hand than constantly moving the cursor to different areas of the screen to press several different buttons.
Delete Discord DM record using AutoHotkey
Now that we have established that DM can be removed without using a mouse, this opens up the possibility of automating the process with a simple AutoHotkey script.
We’ve covered AutoHotkey in the past, such as in our Help Desk article on the five most useful AutoHotkey scripts, and the app is free to install and takes just a minute. However, this option is only available to Windows users as AutoHotkey does not currently work on macOS.
Ideally, you will need the following things from your AutoHotkey script:
- a toggle button to turn it on and off.
- Complete keyboard sequence with pauses between each step
- How to continuously download earlier messages
Here’s an example of a script I wrote:
F1 ::
Toggle: =! Toggle
loop {
if not Toggle
break
if WinExist (“ahk_exe discord.exe”)
WinActivate
SendInput {Up}
Sleep 100
SendInput { Up}
Sleep 100
SendInput ^ a
Sleep 100
SendInput {Backspace}
Sleep 100
SendInput {Enter}
Sleep 100
SendInput {Enter} < br> Sleep 100
SendInput {WheelUp}
Sleep 200
}
return
This script uses the F1 key as a toggle to enable or disable message deletion. For this to work, you must already be in the active DM window before enabling the script. The pauses (sleep mode) between each keystroke are designed to prevent machines with less processing power from outrunning themselves and missing a key. If you find that this scenario works but behaves strangely, try increasing the value of each sleep mode in increments of 50.
However, this script has a caveat: it will break when it receives a Discord call message. Here’s how they look:
Once you reach one of these messages, you will not be able to press the Up key to select the previous messages before it. However, improvements can be made to the script to resolve this issue.
Deleting Discord DM History Using Bots
Delete Discord DM history using robots
Let us first be clear that we will not be providing instructions on how to use the Discord bot to delete your DM history, but we are advising readers that it is possible.
Over the past few years, Discord has gone from banning the use of self-bots to outright labeling it as a violation of the terms.
Thank you for your attention. We do not support the use of self-bots and we strongly recommend that users avoid using them.
– Discord (@discordapp) April 10, 2017
However, the use of bots puts your account at risk of termination, so we cannot offer to do so. However, many users report that using self-bots for purposes that are not public, destructive, or malicious has never resulted in a reprimand from Discord. Make your decision on your own.
Sambot is just a user account running on the Discord API token. Discord today requires bots to be tracked and tagged on the developer portal. Sambot bypasses this and gives the standard user account access to API requests, allowing them to automate a wide range of tasks. Deleting messages is one of them.
The Discord API currently supports a POST request that fires a Bulk Delete Gateway event, allowing bots to quickly delete all messages that are less than two weeks old. Old messages can be queued and deleted individually (with rate limiting).
Since Discord seems to be happy with our messages being kept forever, we must develop solutions to delete them in bulk and keep our privacy. All three of the above options are a bit cheesy, but this is the best we have until Discord comes up with a solution.
–