Mass deleting discord message for free / paid
- Redact (BEST overall - works on Discord / Reddit/ Twitter)
- Discord History Tracker
- DeleteDiscordMessages
1. Redact (Best Way for Mass Deleting Discord Messages for Non-Technical Users)
Experience: Redact offers an easy solution for mass deleting Discord messages in bulk. It provides granular control over the timeframe, allowing users to specify dates, months, weeks, or years to include or exclude when deleting messages. The non-technical interface is user-friendly, making it easy to navigate and select the desired options. It can also be used for deleting reddit comments and as well as tweets on twitter.
Usage: Redact is a paid software that requires a subscription. Users can sign up, connect their Discord account, and start deleting messages in bulk. The software handles the deletion process efficiently, saving time and effort.
2. Discord History Tracker (Technical Discord Mass Deleter)
Experience: Discord History Tracker is a free, open-source tool that allows users to bulk delete their Discord DMs. While it may not have as many features as paid alternatives. You need to know a bit of coding knowledge to use this tool.
Usage: To use Discord History Tracker, users need to download the software and run it on their computer.
3. DeleteDiscordMessages (Technical Mass Deleter for Discord)
Experience: DeleteDiscordMessages is a straightforward script that enables users to delete all their messages from a specific Discord DM or channel. It is a free, open-source solution that requires some technical knowledge to set up and use. The script is efficient and can delete messages quickly.
Usage: To use DeleteDiscordMessages, users need to have Node.js installed on their computer. They can then download the script from GitHub, configure the necessary settings (such as the Discord token and channel ID), and run the script. The messages will be deleted from the specified DM or channel.
4. MEE6
Experience: MEE6 is a popular Discord bot that offers various moderation and utility features, including the ability to mass delete messages. While it is primarily designed for server management, users can utilize its deletion capabilities for their own messages. The bot is easy to set up and use, with clear instructions provided.
Usage: To use MEE6 for mass deleting messages, users need to invite the bot to their Discord server and grant it the necessary permissions. They can then use the appropriate command (e.g., !clear) followed by the number of messages they want to delete. MEE6 will promptly remove the specified number of messages from the channel.
5. Dyno
Experience: Dyno is another well-known Discord bot that provides a range of moderation and utility features, including mass message deletion. Similar to MEE6, it is user-friendly and offers a convenient way to delete multiple messages at once. The bot is reliable and has a good reputation in the Discord community.
Usage: To use Dyno for mass deleting messages, users need to invite the bot to their Discord server and configure its settings. They can then use the designated command (e.g., ?purge) followed by the number of messages they want to delete. Dyno will swiftly remove the specified messages from the channel.
Sources:
I'm making a bot that manages servers, and I would like to know how to delete all channels currently in a server with a single command
-
Open Discord in a browser like Chrome or Firefox;
-
Open DevTools pressing F12 or ⌘ command+option+J;
-
Copy the deleteDiscordMessages.js script and paste it in the Console, then press ENTER;
-
Edit the following text, then paste it in the console:
Continue reading for instructions on how edit each variable
// fill with your info var authToken = "MTX5MzQ1MjAyMjU0NjA2MzM2.ROFLMAO.UvqZqBMXLpDuOY3Z456J3JRIfbk"; var authorId = "112233445566778899"; var channelId = "112233445566778899"; var firstMessageId = ""; deleteMessages(authToken, authorId, channelId, firstMessageId); //start
I recommend that you paste it inside a text editor, change it and then paste it in the console.
-
It will start to delete messages. You will be able to follow the progress and the remaining time in a popup window.
Do not close this window while it is running!
Inside the console, type (uppercase) STOP=1
and press ENTER.
- Open the dev tools (F12), open the Network tab. (You should clear all requests for better readability if you see some.)
- Delete one message manually. In the request log, you will see a request with a DELETE method.
- Click on the request to open the details, and on the Headers tab, copy the 'authorization' token. It's a long text > with dots like
MTX5MzQ1MjAyMjU0NjA2MzM2.ROFLMAO.UvqZqBMXLpDuOY3Z456J3JRIfbk
.
- Right click your avatar in a message you sent in the chat, Copy ID
NOT THE MESSAGE THE AVATAR.
(You cannot delete the other's person messages a in DM channel, you will get Error 403)
- For public channels: Right click a channel, Copy ID
- For a DM/Direct messages: copy the number after /@me/ in the URL)
- Delete messages after one message:
Right click a message, Copy ID
- Delete since the begining of a channel:
Leave this variable empty""
.
If the Copy ID
menu doens't show up when right clicking:
- Enable developer mode in discord
Go to user Settings > Appearance in discord and enable Developer mode.
DISCLAIMER: USE AT YOUR OWN RISK! I TAKE NO RESPONSABILITY FOR ANYTHING POSTED HERE!
Last tested: 2019-MAY-25
//Paste this function in DevTools console inside Discord | |
/** | |
* Delete all messages in a Discord channel or DM | |
* @param {string} authToken Your authorization token | |
* @param {string} authorId Author of the messages you want to delete | |
* @param {string} channelId Channel were the messages are located | |
* @param {string} afterMessageId Only delete messages after this, leave blank do delete all | |
* @author Victornpb <https://www.github.com/victornpb> | |
* @see https://gist.github.com/victornpb/135f5b346dea4decfc8f63ad7d9cc182 | |
*/ | |
function deleteMessages(authToken, authorId, channelId, afterMessageId) { | |
const start = new Date(); | |
let delayDelete = 500; | |
let delaySearch = 1000; | |
let delCount = 0; | |
let failCount = 0; | |
let estimatedPing = 220; | |
let grandTotal; | |
let throttledCount = 0; | |
let throttledTotalTime = 0; | |
const history = []; | |
const wait = async (ms) => new Promise(done => setTimeout(done, ms)); | |
const msToHMS = (s) => `${s / 3.6e6 | 0}h ${(s % 3.6e6) / 6e4 | 0}m ${(s % 6e4) / 1000 | 0}s`; | |
function logger(type, args, style = '') { | |
console[type].apply(console, args); | |
history.push(args); | |
pp.insertAdjacentHTML('beforeend', `<div style="${style}">${Array.from(args).map(o => typeof o === 'object' ? JSON.stringify(o) : o).join('\t')}</div>`); | |
popup.scrollBy(0, 1e10); | |
} | |
function log() { logger('log', arguments, 'black'); } | |
function log_info() { logger('info', arguments, 'color:darkturquoise;'); } | |
function log_verb() { logger('debug', arguments, 'color:gray;'); } | |
function log_warn() { logger('warn', arguments, 'color:orange;'); } | |
function log_error() { logger('error', arguments, 'color:red;'); } | |
function log_success() { logger('log', arguments, 'color:green;'); } | |
var popup = window.open('', '', 'width=800,height=1000,top=0,left=0'); | |
if (!popup) return console.error('Popup blocked! Please allow popups and try again.'); | |
popup.document.write('<span>...</span>'); | |
popup.document.body.innerHTML = '<pre></pre>'; | |
const pp = popup.document.getElementsByTagName('pre')[0]; | |
log_info(`Started at ${start.toLocaleString()}`); | |
log(`channelId=${channelId} authorId=${authorId} firstMessageId=${afterMessageId}`); | |
log_info(`---- You can abort by setting STOP=1 on the console ----`); | |
recurse(); | |
async function recurse() { | |
const headers = { | |
"Authorization": authToken | |
}; | |
const deleteAfter = `search?author_id=${authorId}` + (afterMessageId ? `&min_id=${afterMessageId}` : ''); | |
const baseURL = `https://discordapp.com/api/v6/channels/${channelId}/messages/`; | |
let resp; | |
try { | |
resp = await fetch(baseURL + deleteAfter, { | |
headers | |
}); | |
} catch (err) { | |
log_error('Something went wrong!', err); | |
return; | |
} | |
// not indexed yet | |
if (resp.status === 202) { | |
const w = (await resp.json()).retry_after; | |
throttledCount++; | |
throttledTotalTime += w; | |
log_warn(`This channel wasn't indexed, waiting ${w} ms for discord to index it...`); | |
await wait(w); | |
return recurse(); | |
} | |
if (!resp.ok) { | |
if (resp.status === 429) { | |
const r = await resp.json(); | |
const x = r.retry_after; | |
throttledCount++; | |
throttledTotalTime += x; | |
log_warn(`! Rate limited by the API! Waiting ${x} ms ...`); | |
await wait(x); | |
return recurse(); | |
} else { | |
log_error('API respondend with non OK status!', await resp.json()); | |
return; | |
} | |
} | |
const result = await resp.json(); | |
const total = result.total_results; | |
if (!grandTotal) grandTotal = total; | |
log_info(`Messages to delete: ${result.total_results}`, `Time remaining: ${msToHMS((delaySearch * Math.round(total / 25)) + ((delayDelete + estimatedPing) * total))} (ping: ${estimatedPing << 0}ms)`); | |
if (result.total_results > 0) { | |
for (let i = 0; i < result.messages.length; i++) { | |
const element = result.messages[i]; | |
for (let j = 0; j < element.length; j++) { | |
const message = element[j]; | |
if (window.STOP) return log_error('STOPPED! (If you want to continue set STOP=0 and run again!'); | |
if (message.type === 3) { | |
log_verb('Found a System message!? skipping it...', message); | |
} else if (message.author.id == authorId && message.hit == true) { | |
log(`${((delCount + 1) / grandTotal * 100).toFixed(2)}% (${delCount + 1}/${grandTotal}) Deleting ID:${message.id}`, | |
`[${new Date(message.timestamp).toLocaleString()}] ${message.author.username}#${message.author.discriminator}: ${message.content}`, | |
message.attachments.length ? message.attachments : ''); | |
const s = Date.now(); | |
let resp; | |
try { | |
resp = await fetch(baseURL + message.id, { | |
headers, | |
method: "DELETE" | |
}); | |
delCount++; | |
} catch (err) { | |
log_error('Failed to delete message:', message, 'Error:', err); | |
failCount++; | |
} | |
if (!resp.ok) { | |
if (resp.status === 429) { | |
const r = await resp.json(); | |
const x = r.retry_after; | |
throttledCount++; | |
throttledTotalTime += x; | |
log_warn(`! Rate limited by the API! Waiting ${x} ms ...`); | |
await wait(x); | |
i--; | |
} else { | |
log_error('API respondend with non OK status!', resp); | |
} | |
} | |
estimatedPing = (estimatedPing + (Date.now() - s)) / 2; | |
await wait(delayDelete); | |
} | |
} | |
} | |
log_verb('Getting next messages...'); | |
await wait(delaySearch); | |
return recurse(); | |
} else { | |
log_success('---- DONE! ----'); | |
log_info(`Ended at ${new Date().toLocaleString()}! Total time: ${msToHMS(Date.now() - start.getTime())}`); | |
log(`Rate Limited: ${throttledCount} times. Total time throttled: ${msToHMS(throttledTotalTime)}`); | |
log(`Deleted ${delCount} messages , ${failCount} failed.`); | |
return result; | |
} | |
} | |
} | |
//END. |
FAQ: Discord Mass Deletor Software
Q: Why do these five software solutions offer different approaches to mass deleting Discord messages, catering to various user preferences and technical skill levels?
A: It depends on the usability and the customization of how many messages you wanted deleted and which messages exactly.
Whether using a paid software like Redact, a free technical script like DeleteDiscordMessages, or a versatile bot like MEE6 or Dyno, users can efficiently manage their Discord messages and maintain a clutter-free chat history.
Top comments (2)
Feel free to recommend more ways to mass delete discord DMs / messages!
Disclaimer for comments
DO NOT SHARE YOUR TOKEN.