Delete discord user message history
This script allow for user specific message deletion from an entire server or a single channel using the browser console. This script uses discord search API and it will only delete messages of a chosen user.
How to use
1. Enable developer mode in discord
Go to user settings > appearance in discord and enable Developer mode.
2. Copy and paste the script to a file so you can change the server and author ids.
3. Replace the server and author ids with your own.
Open discord and right click on the server icon and click copy id. Replace the server id in the script with your server id. Do the same process for the author id by right clicking the avatar image.
4. Run script in console
Press F12 in Chrome or Firefox to open the console. Paste the modified script in the console and press enter.
The more messages the longer it takes. You can check if the messages have been deleted by using the search.
I think there are some channels that this script won't work with. I think they may be NSFW channels but I haven't tested enough.
Use this script at your own risk
This script was based on the following scripts https://gist.github.com/niahoo/c99284a8908cd33d59b4aff802179e9b#gistcomment-2397287 https://gist.github.com/IMcPwn/0c838a6248772c6fea1339ddad503cce