Replies: 1 comment 19 replies
-
Hello!
Yes, I think it's the way to go. This means we won't have to come up with something entirely new ourselves and most users will be familiar with the syntax.
From the outset it looks like even simple regex expressions can do because there aren't any nested tokens, so a recursive-descent parser (like the one I built for markdown) is not necessary. |
Beta Was this translation helpful? Give feedback.
-
I'm opening this discussion thread to explore possible approaches to implementing a solution for #160. The ability to filter which messages are exported and downloaded is perhaps one of the most requested features.
Relevant issues include: #28 #178 #219 #336 #343 #361 #384 #430 #566
As the scope of these requests varies from "export the messages of a specific user" to "compound filters with boolean operators", we should probably first determine to what extent the feature would encompass. I'm personally in favor of adding a query parameter which uses syntax similar to the search bar in the Discord client (e.g.
from:236257776421175296 before:2021
), but as far as I know, Discord doesn't expose their search function in their API. Discord's search is also complex (e.g. supports spaces likefrom:96 LB#7383
), quirky (e.g. searchingring
brings up results forringing
but notr
), and limited (no support for "OR" or "NOT" queries). As such, implementing a close copy would be basically impossible.I think we could reasonably implement a simple
key:value
query syntax. I did an extremely cursory search for useful libraries and nothing stood out, but I'm sure something like that exists. It probably wouldn't be difficult to build on our own either; though it may be a little more of a challenge to search for text the way Discord does unless we add our own properties such ascontains:
orstartswith:
(which I don't think is a bad idea).There's a lot to discuss with this feature, so hopefully this gets the ball rolling.
Beta Was this translation helpful? Give feedback.
All reactions