Discord is a popular messaging platform that allows users to communicate with each other through text, voice, and video. If you are a server owner or administrator, you may find yourself needing to clean up your server’s message history from time to time. In this tutorial, we will explore how to mass delete messages on a Discord server.
Why Would You Want to Mass Delete Messages?
There are several reasons why you might want to mass delete messages on your Discord server. It could be due to spam or inappropriate content that violates your server’s guidelines. Alternatively, you may simply want to declutter your server and start fresh.
How to Mass Delete Messages on Discord Server
To mass delete messages on a Discord server, follow these steps:
Step 1: Open the Discord App
If you haven’t already done so, open the Discord app on your computer or mobile device and log in to your account.
Step 2: Access Server Settings
In the left sidebar, locate and click on the server where you want to delete messages. This will open the server settings.
Step 3: Open the Channel
In the server settings, navigate to the channel where you want to delete messages. Click on the channel name to open it.
Step 4: Enable Developer Mode
To access additional options for message deletion, you need to enable Developer Mode in the Discord settings. Go to User Settings by clicking on the gear icon at the bottom-left corner of the app.
Under “App Settings,” select “Appearance.” Scroll down until you find “Developer Mode” and toggle it on.
Step 5: Copy Channel ID
Return to the channel where you want to delete messages. Right-click on the channel name in the sidebar and select “Copy ID.” This will save the channel’s ID to your clipboard.
Step 6: Open Web Browser
Open a new web browser tab or window and enter the following URL:
https://discord.com/channels/
Step 7: Paste Channel ID
In the URL you just opened, paste the channel ID you copied earlier after “/channels/”. Press Enter or Return to load the channel in your browser.
Step 8: Open Developer Tools
To access Discord’s developer tools, right-click anywhere on the page and select “Inspect” or “Inspect Element.” This will open the browser’s developer tools panel.
Step 9: Navigate to Console Tab
In the developer tools panel, locate and click on the “Console” tab. This is where we will enter a command to delete messages.
Step 10: Enter Command
In the console, type or paste the following command:
- var messagecount = 100;
- var delay = 5000;
- var channel = “PASTE_CHANNEL_ID_HERE”;
- // Fetch last ‘messagecount’ messages from specified ‘channel’
- // Delete them with a delay of ‘delay’ milliseconds between each deletion
- // Refresh page after all messages are deleted (optional)
- var messages = document.querySelectorAll(‘.message-2qnXI6’); setInterval(function() { for (const message of messages) { message.querySelector(‘.button-1ZiXG9’).click(); } }, delay);
Replace “PASTE_CHANNEL_ID_HERE” with the channel ID you copied earlier. This command will select and delete the last 100 messages from the specified channel with a delay of 5 seconds between each deletion. If you want to change these values, modify the variables “messagecount” and “delay” accordingly.
Step 11: Execute Command
Press Enter or Return to execute the command. Discord will start deleting messages one by one, and you will see them disappear from the channel.
Conclusion
In this tutorial, we have learned how to mass delete messages on a Discord server. By following these steps, you can efficiently clean up your server’s message history and maintain a clutter-free environment.
Note that mass deleting messages is a powerful action that cannot be undone. Make sure to double-check your commands and use this feature responsibly.
Happy cleaning!