Hello fellow privacy enthusiasts!
I created [DiscordCleanse](https://github.com/Axonym/DiscordCleanse) to ease out the message deletion in case you want to delete messages before deleting your account or for whatever reason your want to delete messages.
This program is similar to [Undiscord](https://github.com/victornpb/undiscord) but instead of relaying on Discord's search API it gets the message IDs from Discord Data Package that you can request from Discord.
Also to note you have to have access to the channel you want to delete the messages from otherwise it won't work.