-
Notifications
You must be signed in to change notification settings - Fork 1.2k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search Bar Functionality #663
Comments
This is purposefully not in the API. Like you said, search is very straining and thus discord limits it to human use only to limit the load. |
@Pikachu920 No idea what's Discord team stance on using undocumented stuff, never had need for anything not mentioned in docs. |
It’s a pretty easy guideline: if it’s undocumented, don’t use it. |
@wipe2238 but can bots use that endpoint? |
They can't, it's for user accounts. |
We've thought about adding support for this in the past, not sure if its still planned but I'll bump the request internally. |
That would be great, it really sucks to have to load a million messages with a bot just to find a couple hundred from one user! |
The plan has always been to allow bots to use the search API, with a pretty high rate limit, and no message context, however this has always been considered a really low priority task, relative to other things the team and myself are working on. However, if you’re interested, replying to this issue with your specific use case and thumbs upping this comment will help me make a case for prioritizing this internally. |
I've been waiting patiently for this mostly for statistical purposes. In my case, the |
My bot is used for Official Game servers for various different games. The game developers asked me to build a feature that could help them find key topics that are being discussed by all the players on those servers. In this specific case, I was asked to analyze how many players have sent a message discussing Another case was about checking community feedback on certain topics. Example a new hero is released or some change is made and they wan't to get all the messages sent about that hero in X time frame that can be processed into These official servers are really big for example, two off the top of my head are 92,000+ and 34,000+ members and really active servers. These were requested based on how a similar thing was possible on a separate platform and it was asked of me if it was possible on discord as well. Theoretically, I can build this with loops and fetching every message in that time but that is kind of crazy due to the server's size. I made this issue in the hopes of finding a better way. My use case is just one example of what is possible with this. Search opens up enormous possibilities for bot devs. Just a few examples:
|
Apart from the analytics side of things: I don't intend to develop this feature myself, as all of my bots are application-specific, but I could also see this feature being useful for pruning messages via general-purpose moderation bots, which could be given a search string in the same format as the search bar uses and delete all the messages that match it. (An obvious limitation to the usefulness of something like this would be that messages older than two weeks can't be deleted via the bulk delete method (iirc), but bots could easily check themselves for messages in the results to fall within this time frame, and such a feature would still be useful regardless.) |
@Geo1088 indeed, the search endpoint supports (though, i feel |
Part of my bot's logging features allow people to make decisions about if they should ban people based on their past behaviour on the server, it would be nice to be able to pull how much a user has chatted / some samples of messages in a user info command. For example someone who barely speaks and is suddenly attacking a bunch of people in chat is probably a problem, but if someone that's a contributing community member every day starts something one day, it may just be them having a bad day. This would be along with the message deleting, say purging a specific users messages from a channel going back a couple days, without necessarily banning them then unbanning them or something like that, but I think Geo has already made a good case for that. |
Bumping this. |
Bump. Would be very useful for moderating older comments that our current bots didn't filter. Thanks! |
Bump - my usecase is getting the total amount of messages sent by a user and the putting that into a csv or some usable output. |
I also want to use this endpoint mainly just for getting the number of messages for a query. |
For me, it would be easier and convenient to implement some moderation feature such as the inactive members pruning used by Libereus since I no longer need to write expensive check like this. (Which can take hours on large servers) |
Jumping on the bump train, very useful for monitoring how often key phrases are used or for getting info on a user's activity levels in servers that can't use the built-in prune function for some reason or another |
I'd use this in my epic projects! |
I would use this for moderation (deleting all messages matching certain criteria), notifications (DMing users when messages appear with certain criteria) and statistics (seeing which channels and users are the most active). I restart my bot relatively frequently due to development, so in particular being able to find messages not in cache, and to notify users of messages sent while restarting, would be very useful. |
Bump - need this to search for moderation purposes, searching users' post history since the entire lifespan of the server. |
Bump, as others have said this would be very useful for statistics. |
Why was this closed? |
It's not? |
It is still open; the linked issue was closed. |
I want to see which emoji is used the least, to replace them with better ones. This will help so I don't have to search manually 1 by 1 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
One of the coolest things on discord is how amazing it's search bar works. Unfortunately, there is no way to interact with it using a bot that I am aware of. Instead i would have to fetch hundreds of thousands if not millions of messages depending on the servers activity and size in order to get the same functionality.
Is it possible to add this functionality so a request could be made something like:
Which could send back any and all necessary messages instead of having to fetch so many messages in a loop.
The text was updated successfully, but these errors were encountered: