TIA for your help and apologies, I'm a newbie so this may be a foolish question. The problem I'm having is I'm also using commands which now no longer work because the bot only responds if the message begins with "Cluebot:" Can I have the bot only look for "Cluebot:" in a specific channel?

How to Delete All Messages in Discord

How to Delete All Messages in Discord

Deleting messages on any platform is sometimes necessary to free up space, reinvent yourself, or eliminate years of clutter. Discord is no different, and some users feel compelled to delete all of their messages at some point or other. However, bots can help you delete messages in bulk if you’re a server owner or Admin. Unfortunately, Discord doesn’t give us the most straightforward options to delete all messages. In the past, Discord only discouraged users from using self-bots to delete direct messages. But users did so en masse, so Discord proclaimed it a violation of terms.

Nowadays, Discord wants all bots tracked and tagged via the ubiquitous Developer Portal. A self-bot sidesteps these rules, allowing you and any other user to make API requests and automate many tasks. These requests trigger an event called Message Delete Bulk.

It’s important to note that Discord doesn’t allow for complete DM removal. Be aware that if you have a chat history that spans several years and thousands of messages, it might take you some time to delete it entirely. In the FAQ section, we’ll talk about some of the limitations of removing messages in Discord.

The most popular option at the moment is the powerful MEE6 bot, but CleanChat ranks high as well. If your server is new and has only a handful of messages, you might be able to get rid of them in one fell swoop.

So, here we’ll cover Windows, iOS, macOS, Linux, and Android devices. The MEE6 bot is one of the most powerful options at your disposal if you want to purge your server channels.

Open the browser on the device of your choice and search for the official MEE6 bot’s site. In fact, we recommend this if it’s your first time installing a bot to your Discord server. There, you’ll get the summary of permission requests that the bot needs to work correctly. Now, Discord will display the full list of permissions you’re about to give the MEE6 bot.

You’ll get a message in the General channel of your server that “A wild MEE6” has appeared. You’ll also see the bot on the list of online members on the right side of the Discord window. Once you’re satisfied, you can go back to your server and start deleting messages. A lot of users have asked why Mee6 isn’t following the ‘!clear’ command. No matter how many times we typed the command into the text box, nothing happened. Scroll all the way down to the Commands section and toggle the switch next to !Clear.

The CleanChat bot is a powerful tool dedicated to keeping your chat as clean as possible. Its main task is to silence other bots you might have on the server, if you can use it to delete messages, too.

Open your favorite browser and search for “alexandernorup.com.” Click or tap on the result that leads straight to the download page. If you scroll down a bit, you’ll find the tutorial video and text explanations of some of the most important functions and options. You’ll see it on the list of active server members on the right side of the Discord screen.

Bots that can delete messages from channels will ask for administrative rights in one way or another. The messages you remove from your account will stay on Discord’s servers, and the other person will be able to access them at their discretion. You can’t use a bot to delete direct messages, as the platform doesn’t allow that.

node.js

node.js

var before = 'LAST_MESSAGE_ID'; var your_username = ''; //your username var your_discriminator = ''; //that 4 digit code e.g. username#1234 var foundMessages = false; clearMessages = function(){ const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, ""); const channel = window.location.href.split('/').pop(); const baseURL = `https://discordapp.com/api/channels/${channel}/messages`; const headers = {"Authorization": authToken }; let clock = 0; let interval = 500; function delay(duration) { return new Promise((resolve, reject) => { setTimeout(() => resolve(), duration); }); } fetch(baseURL + '?before=' + before + '&limit=100', {headers}) .then(resp => resp.json()) .then(messages => { return Promise.all(messages.map((message) => { before = message.id; foundMessages = true; if ( message.author.username == your_username && message.author.discriminator == your_discriminator ) { return delay(clock += interval).then(() => fetch(`${baseURL}/${message.id}`, {headers, method: 'DELETE'})); } })); }).then(() => { if (foundMessages) { foundMessages = false; clearMessages(); } else { console.log('DONE CHECKING CHANNEL!!!'). var before = 'LAST_MESSAGE_ID'; clearMessages = function(){ const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, ""); const channel = window.location.href.split('/').pop(); const baseURL = `https://discordapp.com/api/channels/${channel}/messages`; const headers = {"Authorization": authToken }; let clock = 0; let interval = 500; function delay(duration) { return new Promise((resolve, reject) => { setTimeout(() => resolve(), duration); }); } fetch(baseURL + '?before=' + before + '&limit=100', {headers}) .then(resp => resp.json()) .then(messages => { return Promise.all(messages.map((message) => { before = message.id; return delay(clock += interval).then(() => fetch(`${baseURL}/${message.id}`, {headers, method: 'DELETE'})); })); }).then(() => clearMessages()); } clearMessages();.

Add CommandCleanup Discord Bot

Add CommandCleanup Discord Bot

Pairing this command with parameters gives you MAXIMUM chat moderation control. Sends helpful documentation about commands, their usages, their aliases and even a short description.

Valid image extensions are webp , png , jpg , jpeg & gif. Deletes messages with plain text (no embed, no images, no files, etc..). Valid quotes are any word/sentence enclosed in quotation marks, example "hello world".

Valid prefixes are any word/symbols enclosed in quotation marks, example "!play". Targets messages from users that no longer exist in the server (kicked, banned, left, etc..). Timeframes are constructed by numbers followed by a letter/work representing the duration, example 1d equals 1 day.

Unfortunately this bot (like many others) cannot delete messages older than 14 days in mass amounts, this is due to the discord api limiting the bulk-delete endpoint to only delete messages that do not exceed 14 days old. This is a common misconception, purge is a parameter and should be added after the command cleanup . We touched up on why this occurs earlier in the FAQs section, talking about discord bulk-delete limitations. There could be many number of reasons, the most common though is incorrect permissions inside the channel.

Best way to check is make sure the bots (and any of it's roles) aren't denied access to manage messages inside the guild or the channel. If errors persist then feel free to stop by the support server linked below. Here is a great support article talking about how to copy ids from users, roles, messages, guilds, etc..

Add AutoDelete Discord Bot

Add AutoDelete Discord Bot

Keep your Discord channels clean, apply your filters and the bot will automatically start deleting messages after a time. AutoDelete is one of the best Discord Bots out there that helps you keep the channels in your server clean.

Unlike many other bots AutoDelete has more then 8 preset filters that ensure the best experience. This option allows you to choose which messages the bot is supposed to delete. : Deletes only messages that were sent by a member with a specific role specific-link : Deletes only messages that contain a specific link. Which means that if someone is ignored then his messages will NOT get deleted. The bot allows you to set a Messages Timeout , which means that it will automatically delete messages older then this timeout. AutoDelete also has a LogChannel option, in which the bot will send every action.

A link listing every message the bot deleted. Tired of giving users server permissions just to setup a bot?

AutoDelete will solve that for you, it allows you to give users BOT permissions, so he can use AutoDelete commands without extra guild permissions.

Related Posts

Leave a reply