Message search filter endpoint
We should have an endpoint that behaves like the search function in the Discord client. All the functional specifications for this endpoint is already available there. I do not see any problem with this since we are already able to fetch all channel messages. We just need the search filters to be done on the API side.
My own use-case is that I have a channel that serves as a vouching system for my marketplace users. The said channel already contains 4200+ messages and I can only fetch 100 messages at a time with discord.js. Here's what happening in my server's feature:
Current process:
- Someone sends a valid vouch in #vouchchannel
- My bot detects that, fetches necessary data and saves on its database
- When a user uses /stats command, it looks into the database of the bot
- To ensure data sync between the channel and the bot, there is an /extract command to fetch 100 messages at a time and recreates the /stats database. Added due to message edits/deletions, vouches during bot downtime
Optimal process for me:
- Someone sends a valid vouch in #vouchchannel. No processing happens
- When a user uses /stats command, it just fetches all live messages that are vouching the user being checked in /stats and calculates the relevant data
As much as possible, all search/filter processes are in the back-end side of systems. Thanks
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
0 Kommentare