I found this script ages ago and i cant find it anymore so im posting it here, it can clear your discord dms, and clear all the messages in a channel that you have sent. The commands are: cleardms - it does what it says, send it anywhere and it will fetch your dms and delete them, all of them. cl - fetches the messages you sent in a channel and deletes them.
if you have a lot of dms it will obviously take a while but your account should be fine, it is a self bot, so it is against tos but discord probably wont know
Have Fun and be safe out there.
Edit the clscript.py file with any text editor, find "PUT_TOKEN_IN_THESE_QUOTES"
and replace your discord user token with that. then save, exit.
To CD into the file to install the requirements go to where the file is, click and highlight the little address bar on the file, copy that
then go into your command prompt and type cd <Whatever_You_Copied>
then press enter.
Do pip install -r requirements.txt
to install what the script needs to run.
Double click it to run, it will open a command prompt, then do either cl
to delete all messages you sent in a channel, or send cleardms
to clear your dms. Have Fun :)