Search Bar Functionality #3216
Replies: 39 comments 10 replies
-
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. |
Beta Was this translation helpful? Give feedback.
-
@Pikachu920 No idea what's Discord team stance on using undocumented stuff, never had need for anything not mentioned in docs. |
Beta Was this translation helpful? Give feedback.
-
It’s a pretty easy guideline: if it’s undocumented, don’t use it. |
Beta Was this translation helpful? Give feedback.
-
@wipe2238 but can bots use that endpoint? |
Beta Was this translation helpful? Give feedback.
-
They can't, it's for user accounts. |
Beta Was this translation helpful? Give feedback.
-
We've thought about adding support for this in the past, not sure if its still planned but I'll bump the request internally. |
Beta Was this translation helpful? Give feedback.
-
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! |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I've been waiting patiently for this mostly for statistical purposes. In my case, the |
Beta Was this translation helpful? Give feedback.
-
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:
|
Beta Was this translation helpful? Give feedback.
-
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.) |
Beta Was this translation helpful? Give feedback.
-
@Geo1088 indeed, the search endpoint supports (though, i feel |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Bumping this. |
Beta Was this translation helpful? Give feedback.
-
Bump. Would be very useful for moderating older comments that our current bots didn't filter. Thanks! |
Beta Was this translation helpful? Give feedback.
-
It's not? |
Beta Was this translation helpful? Give feedback.
-
It is still open; the linked issue was closed. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Bump. I need to count how active a user was in the server, and counting all messages for this is too expensive. |
Beta Was this translation helpful? Give feedback.
-
Bump. Same reasons as everyone else ig. |
Beta Was this translation helpful? Give feedback.
-
Usage of this make sense for me only for counting messages |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? It's been nearly four years 👀 |
Beta Was this translation helpful? Give feedback.
-
My use case would be to get the total number of times a specific user was mentioned within a specific channel. Im making a bot for a FiveM community and need to be able to easily display how many times a user has been commended or DAd |
Beta Was this translation helpful? Give feedback.
-
This is something that would help me out significantly. Instead of having to scan through every message in a channel, you would just be able to search for specific messages containing specific keywords. |
Beta Was this translation helpful? Give feedback.
-
I want to create a bot that allows a user to look for messages with cetain keywords within his/her channels |
Beta Was this translation helpful? Give feedback.
-
Bump. Same reasons as everyone else, still waiting for an official API method for bot instead of me having to use user account just to use this endpoint. |
Beta Was this translation helpful? Give feedback.
-
Bump, need this to get a user's last message |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@advaith1 seems like you also struggled with this. while you still are at discord, could you PLEASE do something to get this implemented? thanks |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions