I use Discord's search tool a lot, not limited to finding messages in servers or DMs. However, to my knowledge, you can currently only search using YES parameters (there's probably a better term for this, but I know nothing about coding, so this stands). For example, say Person A spends most of their time in one channel in a particular server. Let's say they've sent 520 messages in the server in total, and 500 of them are in one channel. I could easily search for the messages Person A has sent in that one channel, but if I want to see the 20 messages they've sent in other channels, I would have to search each channel or scroll down their whole list of 520 messages. Another example is if Person B posts mainly images on a server - I can use the "has:image:" filter to find messages posted by them that contain images, but the inverse is not true: I can't directly search for their messages that don't contain images.
I think it would be really helpful if Discord implemented this feature! This market resolves YES if Discord allows you to any extent to filter for messages that do NOT fit a certain criterion by the end of 2023. The market resolves NO if that doesn't happen, and N/A for unforeseen circumstances or results.
Found a 5 year old feature request with over 2500 upvotes here: https://support.discord.com/hc/en-us/community/posts/360029555752-Search-exclusions
Currently the 14th-most upvoted request in "Text Chat" and something like 32nd-most overall.