How to delete Discord messages from a server I got banend from.

I had beef with one of my friends and he baned from a Discord server that has some private information from me.
How to I delete the messages of this server?

Once you’re banned you can’t see the server anymore, so there’s no way to delete those messages yourself from your account. The realistic options are asking one of the server’s mods or the owner to remove them, or contacting Discord support. If you go the support route, it helps to request your data package first from the privacy settings, since it lists your messages with their channel and message IDs, which is what support usually asks for. I’m not sure how consistently Discord acts on these requests, so I’d try the mods first.

Banning someone also deletes all their messages in the server automatically. So as far as I understand, you’re already safe. The only exception would be if you sent the messages through a bot.