On my Discord server, I have a #selfies channel where people share photos and chat about them. Every now and then, I would like to somehow prune all messages that do not contain files/images. I have tried checking the documentation, but I could see not see any way of doing this. Is it not possible?
You can iterate through every message and do: 
if not message.attachments:
    ...
message.attachments returns a list and you can check if it is empty using if not
Is there a way to check if message.content on Discord contains a file?