Delete all messages in a Discord channel
You have to know how to use your browser developer tools to use this thechnique.
1. Open your channel
The URL must be like
https://discordapp.com/channels/XXXXXXX and not
https://discordapp.com/channels/XXXXXXXXX/YYYYYYYY. If so, change it manually. Once on the right page, you must not reload or navigate.
2. Get your authorization token
- 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
- Click on the request to open the details, and on the Headers tab, copy the 'authorization' thoken. It's a long text with dots like
3. Get the script
Find the line starting with with
var authToken = and paste the token. Pay attention to the quotes. The code should read like this :
// Paste your token between the quotes : var authToken = 'MTX5MzQ1MjAyMjU0NjA2MzM2.ROFLMAO.UvqZqBMXLpDuOY3Z456J3JRIfbk'
This script will only delete the messages that are visible. So, if you want to delete more messages, you should scroll top to show more of them before launch. If you do not have the permissions to delete some messages, the script should still work with yours (not tested).